This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread 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 REST with Spring (video course) this week in the Spring 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: 17276

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 - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Programatically Creating Contriggerbean
It's not a secret anymore!