quartz jdbcjobstore sharing
Qua开发者_StackOverflow社区rtz can store jobs on database so its not volatile. But if i have two application(web-application and web service) , how can i share this store between applications.
That is if one application select a job to run other application informed.And when one application fail it will continue to run
I realise this is a late reply, but for anyone else who might find this useful...
Quartz is designed with clustered environments in mind, specifically for what you're asking. You can point both of your applications (web service and web application) to the same Quartz job database, and Quartz itself will manage locking the jobs so that they still only run according to their schedule.
In your Quartz config make sure you're using: org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
... And then duplicate the Quartz setup across both your applications, ensuring they both point to the same database.
I think it should take care of itself! Search for "Quartz clustering" if you need more info.
精彩评论