What is the default, "sane" configuration for setting up a quartz 1.7 scheduler clustered with terracotta, where spring is managing the jobs/triggers?
We are having trouble figuring out all the settings we need to tweak in order to achieve the following behavior:
* We want all jobs to be clustered and "fail-over" if a node running that job dies/is shut down during the job.
What we are interested in is two things. First, quartz.properties file should have the following:
* org.quartz.jobStore.class = org.terracotta.quartz.TerracottaJobStore
* org.quartz.jobStore.isClustered = true
(as stated here: http://www.terracotta.org/documentation/ga/product-documentation-11.html#50491405_29905)
What else SHOULD or SHOULD NOT be set in quartz.properties that would specifically inhibit clustered job behavior?
Here is our complete quartz.properties for reference. Are we doing anything wrong here?
Code:
org.quartz.scheduler.instanceName = DefaultQuartzScheduler
org.quartz.scheduler.instanceId = stellaQuartzSchedulerId
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy = false
org.quartz.scheduler.wrapJobExecutionInUserTransaction = false
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 50
org.quartz.threadPool.threadPriority = 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
org.quartz.jobStore.misfireThreshold = 60000
org.quartz.jobStore.class = org.terracotta.quartz.TerracottaJobStore
org.quartz.jobStore.isClustered = true
Next, we need to know how Spring Jobs should be configured. Our trigger bean "prototype" looks like this:
Code:
<!-- run every night at midnight -->
<bean id="midnightTrigger" parent="cronTriggerBean">
<property name="jobDetail">
<bean class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="name" value="Midnight Job"/>
<property name="jobClass" value="company.jobs.MidnightJob"/>
<property name="volatility" value="true"/>
</bean>
</property>
<property name="cronExpression" value="0 0 0 * * ?"/>
</bean>
The thing that looks most suspicious here is the "volatility" property we set on the JobDetailBean. Additionally, it seems like we should be setting the "requestsRecovery" property to "true" to ensure the desired fail-over behavior mentioned earlier in this post.
Thank you for your help.