wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes Quartz1.6.4 - how to maintain state after system/application restart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Quartz1.6.4 - how to maintain state after system/application restart" Watch "Quartz1.6.4 - how to maintain state after system/application restart" New topic
Author

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

jeff rusty
Ranch Hand

Joined: Nov 07, 2006
Posts: 109
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

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


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
jeff rusty
Ranch Hand

Joined: Nov 07, 2006
Posts: 109
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

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

Joined: Nov 07, 2006
Posts: 109
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Quartz1.6.4 - how to maintain state after system/application restart