Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Quartz1.6.4 - how to maintain state after system/application restart

 
jeff rusty
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

In my web application i have a requirement to create jobs dynamically and add it to the scheduler all works fine except when i restart my application or system.
Can somebody guide me with the ways to maintain the JoB state in QUARTZ after system restart. I know that it can be done with JDBC store but i dont wan to use database since it can cause performance issue. Is there is a way where i can use the Job.xml to be updated after creating every job and loading it.
I am using SPRING with quartz zo is there is any way by which SPRING can do the updation of the XML and maintain the state.

please help

Thanks
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not that's I'm aware of, we use a JDBC Store (performance is OK), but found that the SQL generated for Sybase isn't quite correct, so sometimes on server restart it wasn't picking up the stored jobs, we're still investigating that one
 
jeff rusty
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your reply..

are you using spring? if so can you please let me know how to configure it for persistent jobs.

Thanks
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeff,

My colleague (also a Jeff) passed me our current config:

Depending on what flavour of database he is using, the table creation script is in the quartz download, but here is the Sybase one attached. Quartz has a good reference page in its later docs, but the properties are somewhat scattered.

Note the XA resource stuff is commented out for now and we had to use the MS SQL Server driver as you can see below...

Our Spring config entries:-

 
jeff rusty
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Martijn,

Thank you for your quick reponse. But i still didnt get how this will help when i create jobs dynamically as i am new to spring and quartz.

what goes in your 'ikasanJobFactory' 'and perSecurityPolling_schedule' ?

Thanks,
jeff
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ikasanJobFactory is a bean that instantiates a JobFactory, in fact we use a SimpleJobFactory.

The other item is a trigger bean again that's defined in the Spring config, see Trigger We use a CronTrigger IIRC.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic