Clustering feature works with only JDBCJobStore. It include job fail-over and loaded - balancing. Setting up the "org.quartz.jobStore.isClustered" property to "true" for enabling the clustering. Each instance in the cluster used the same copy of the quartz.properties file. Exceptions of this would be to use properties files that are identical, with the following allowable exceptions: Different value for the "org.quartz.scheduler.instanceId" property and different thread pool size. Every node in the cluster MUST have a unique instanceId, which is easily done by placing "AUTO" as the value of this property.
Never use cluster features on separate machines, until and unless their clocks are synchronized using some form of time-sync service that runs very regularly. And you can get a serious data corruption if you fire-up a non clustered instance against the same set of tables that any other instance is running against.
Quartz jobs can execute within a JTA transaction (UserTransaction) by setting the
"org.quartz.scheduler.wrapJobExecutionInUserTransaction" property to "true".
After this setting, a JTA transaction will begin() just before the Job's execute method is
invoked, and commit() just after the call to execute terminates.
For plugging-in additional functionality Quartz provides an org.quartz.spi.SchedulerPlugin interface. Plugins are ship with Quartz to provide various utility capabilities. And that can be found documented in org.quartz.plugins package.
Quartz also includes a number of utility jobs. You can
add this additional utility jobs in you application for doing something like
sending email and invoking EJBs. These out-of-the-box Jobs can be found documented in the
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial