EJB3.1 @Schedule in clustered environment

爷,独闯天下 提交于 2019-12-01 19:12:22

问题


This is a follow up question to EJB3.1 Timer cancel issue

I used Spring's @Scheduled earlier in my projects. Is EJB3.1 @Schedule similar to that? How does EJB3.1 @Schedule fare in Clustered environment? In a Clustered environment where there are multiple JVMs, how can we make sure only one Scheduler/Timer is run at a time? For example I want inventory level from database emailed to a customer for every hour and I don't want duplicated emails being sent out. I know work around like setting a database flag to avoid further duplication. But, I'm not seeing this as a proper solution. Any ideas on this please?

来源:https://stackoverflow.com/questions/21660895/ejb3-1-schedule-in-clustered-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!