Wednesday, April 1, 2009

The Wierd Persistent Quartz Job

I recently faced a problem with getting quartz to persist the jobs in case of a scheduler shut down. Penning down how it got solved (with Ben's help). 


Also, when I configured my stateful job, I set volatility and request recovery to true besides putting in job class, name and group. Sadly, the job never-ever persisted when the system re-started. 

Miraculously, this started working fine when config was replaced by this configuration (only scheduler config is different).

Plus when I configured the stateful job, I set durability to true and always put in job class, name and group. Of course you can add what you want to the data map (as long as it is Serializable). 

What I don't understand is that even when I have not set either volatility or request recovery to true, how setting only durability to true takes care of persisting the Job between shutdowns and startups. Whatever it takes to make it work... Quirky but may be helpful to you if you face a similar problem. Cheers.

No comments: