• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic