-
Jun 30th, 2011, 01:53 AM
#1
Batch Recovery And Repository Update
Hi ,
I'm very new to spring batch and working on a recovery scenario for a system which is using spring batch.
Scenario:
Few Batch jobs are running on different servers (here it's 3) . If one of 'em crashed then other server will restart the task of crashed server.
Since batch repository (Database Repository) not allowing to start a jobs with same parameter until the other job (with same parameter) is not failed or completed mark in repository. But in this scenario (server crash) , Job status will not be update in db repository .
Can any one suggest or guide , how to handle this scenario? Is there any timeout or any repository field which can help to identified batch job status. I want to mark that crash Job Failed or Completed and start a new Job.
Please also correct me if my understanding about spring batch is incorrect.
Thanks
-
Jul 1st, 2011, 06:16 AM
#2
Your understanding is correct. Try looking at the lastUpdated property of the StepExecution and JobExecution - that's your timeout baseline, updated once per chunk for the step and once per step for the job. You have to make a decision about how long to wait before an execution is really dead, but the APIs are all there to get you the information you require.
-
Jan 13th, 2012, 10:26 AM
#3
Hi,
I want to implement recovery of Spring Batch to address server crash scenario, I would like to know if there is any (demonstrable) sample or document that can be referred.
Request your help.
Thanks & Regards
-
Sep 20th, 2012, 02:07 AM
#4
HI,
I am also facing a similar issue. When database crashes (or) server gets disconnected to DB server, my job status will not be updated to DB. So, later when i run the same job, i am getting JobAlreadyRunningException.
Is there any way to stop the job, from the catch block, where i am getting this exception?
Thanks,
krish
Tags for this Thread
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