This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Spring and the fly likes Programatically Creating Contriggerbean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Programatically Creating Contriggerbean" Watch "Programatically Creating Contriggerbean" New topic

Programatically Creating Contriggerbean

p jayasankar

Joined: May 10, 2010
Posts: 2
I am new to Spring.

We have a requirement where we need to store scheduling related details in a database and at runtime we want to create CronTriggerBean by fetching data from database.

We have a table which contains following information
- Class name (which implement QuartzJobBean)
- cronExpression
When application starts, we want to fetch these information from database and create jobs based on database records. So that in future if we want to add new task, I can directly configure from database.

How to achieve this?
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17250

Best way is to use Spring Batch. The documentation for Spring Batch is one of the best documentation out there. It uses a database to store jobs, as well as jobs that have run and their outcomes.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
It is sorta covered in the JavaRanch Style Guide.
subject: Programatically Creating Contriggerbean