-
Feb 24th, 2010, 03:07 PM
#1
Multiple jobs in spring batch
Hi everbody,
Here is my case
My batch application should connect to 3 external databases and read different kinds of data
(Clients, sales transactions etc....) and them update the application database(a 4th dabase)
I planed to create 3 jobs one for each database : so for example the 1 rst step in job1 would be to read client records then save them and the step 2 would be to read transactions and save them
The job2 (for the 2nd external database) would do the same
And the the job 3 (for the 3thrd external database) would do the same
As you may guessed if job one fails, we should into continue with job2 and 3
My problem is actually
How to launch this 3 spring batch jobs in this order with a cron quartz trigger?
any kind of help would be appreciated.
Regards
-
Feb 24th, 2010, 08:03 PM
#2
there is an example of using quartz in the spring batch samples
quartz-job-launcher-context.xml should give you an idea on the wiring
as for ordering -- if its different kinds of data, couldn't you kick them off at the same time or based on some specific times?
Last edited by Chris Schaefer; Feb 24th, 2010 at 08:06 PM.
--
Chris
-
Feb 24th, 2010, 08:46 PM
#3
hi Chris ,
quartz-job-launcher-context.xml should give you an idea on the wiring
I already saw it : it shows only how to trigger a single spring batch from quartz
as for ordering -- if its different kinds of data, couldn't you kick them off at the same time or based on some specific times?
No the 3 jobs should be run sequencly and if one failed the next shouldn`t run.
as we do with steps in spring batch by specifying the next step to run using the next attribute in the step element , is there the equivalement for spring batch jobs or in quart???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules