• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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

 
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
 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • 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
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • 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
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • 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.
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!