作业调度:EJB 3.1 计时器还是 Quartz?
我们的商店目前在现有项目中使用 Quartz。唯一的缺点是 Quartz 线程是非托管运行的。
我们正在转向 EJB 3.1,我想知道是否有任何方法可以复制 Quartz 作业调度的动态特性。具体来说,我想知道是否有人听说过有人使用 EJB 3.1 编写 GUI 前端来处理、管理或编辑作业。
据我所知,这似乎要么不可能,要么非常麻烦。看起来 EJB 3.1 计时器对于它们所在的 bean 来说是私有的,这使得收集它们和检查它们的过程相当困难。另外,EJB 3.1 计时器似乎是纯粹的编程/声明性的,即它们需要重新部署来修改其参数或设置。
在这个领域有什么想法、想法或经验吗?
最后一点,我们使用的是 Websphere 8.0。
Our shop currently uses Quartz for our existing projects. The only draw back is that Quartz threads are run unmanaged.
We are moving to EJB 3.1 and I was wondering if there is any way to replicate the dynamic nature of Quartz job scheduling. Specifically, I would like to know if anyone has heard of someone writing a GUI front end to handle, manage, or edit jobs using EJB 3.1.
From what I've read, this seems either impossible or very cumbersome. It seems that EJB 3.1 timers are private to the bean they reside in, making the process of collecting them and examining them rather difficult. Also, it seems that EJB 3.1 timers are purely programatic/declaritive, i.e. they require a redeploy to modify their parameters or settings.
Any thoughts, ideas, or experience in this arena?
Last note, we are using Websphere 8.0.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,情况确实如此,请参阅我对类似问题的回答:如何获取所有EJB 定时器?
好吧,在您安排计时器的 bean 中,您可以取消计时器并根据需要重新安排它。
总而言之,在使用 EJB 3.1 定时器一段时间后,我可以说它们非常方便,但仍然有一些遗漏。您在这里提到的问题是一个,但也没有可移植的方法来指定计时器的持久保存位置。事实上,通常根本没有办法在项目内部做到这一点。在 Quartz 中这没有问题。
This is unfortunately indeed the case, see my answer to a similar question here: How to get all EJB timers?
Well, from within the bean where you scheduled timers you can cancel a timer and re-schedule it if you wanted to.
All in all, after using EJB 3.1 timers for a while now I can say they are very convenient, but there are still a couple of omissions. The problem you mention here is one, but there is also no portable way to specify where timers are persisted. Actually, there is often no way at all to do this from within a project. In Quartz this is no problem.