Thanks Lucas,
I have reverted to "the true spirit" of Spring Batch:
Code:
<bean id="simpleAsyncTaskExecutor" class="org.springframework.core.task.SimpleAsyncTaskExecutor"/>
<bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
<property name="jobRepository" ref="jobRepository"/>
<property name="taskExecutor" ref="simpleAsyncTaskExecutor"></property>
</bean>
And in my code, I simply wait for the jobExecution to finish:
Code:
jobExecution = launcher.run(job, jobParameters);
while(jobExecution.isRunning())
{
Thread.sleep(1000);
}