In short : the default exiter simply calls the JVM System.exit(), which terminates your JVM.
Explained in more detail here : http://www.dotkam.com/2011/03/15/spring-batch-commandlinejobrunner-to-run-multiple-jobs/
Frage
I am studying about SpringBatch CommandLineJobRunner. I want to run Multiple Jobs from single job. Here is my code. My code is ok but I do not undersand if CommandLineJobRunner.presetSystemExiter( new SystemExiter() do not include it run only 1 job and cannot available multiple job. So please explain me how this work.
CommandLineJobRunner.presetSystemExiter( new SystemExiter()
{
public void exit( int status )
{
}
});
String[] params1 = { jobConfig1, jobID1, "runId=" + new Date().getTime() };
CommandLineJobRunner.main(params1);
String[] params2 = { jobConfig2, jobID2, "runId=" + new Date().getTime() };
CommandLineJobRunner.main(params2);
Thank you very much.
Lösung
In short : the default exiter simply calls the JVM System.exit(), which terminates your JVM.
Explained in more detail here : http://www.dotkam.com/2011/03/15/spring-batch-commandlinejobrunner-to-run-multiple-jobs/