How to use config immutant to implement quartz cluster?

133 views Asked by At

I want to start several web-server, and every server has a quartz instance for avoiding the job being interrupted by restarting the server.

I found that immutant can config the single job .But when i run the server i found that the scheme use the not-cluster config.And i do not know how to config it.

1

There are 1 answers

0
Toby Crawley On

Immutant has built-in support for singelton jobs, but it requires running your application in a WildFly cluster, and does not use Quartz's clustering functionality.

Quartz clustering requires a JDBC JobStore, and Immutant does not currently expose a way to set a JobStore for the scheduler instance. The clustering works by using the database to lock the job - it would not be difficult to implement something similar yourself, by scheduling the same job on every node in the cluster, and using an external store as a synchronization mechanism, allowing the job to run on only one node at a time.

If you truly need the clustering inplementation in Quartz, or need more control over scheduler creation than Immutant provides, please file an issue against Immutant to have those options exposed. In the interim, you could take a look at Quartzite, I believe it exposes more options for scheduler creation.