ayengin
ayengin

Reputation: 1596

quartz jdbcjobstore sharing

Quartz 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

Upvotes: 0

Views: 435

Answers (1)

Raventhe
Raventhe

Reputation: 86

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.

Upvotes: 1

Related Questions