May 27th, 2011, 11:30 AM
i figured i must have done something wrong when my job was not doing its 'job', but the spring-batch-jobs showed that the job was launched ...
so i tried the spring-batch-integration source and checked out the launch configuration settings, and sure enough the job was not doing' its job there either.
The joblaunchrequest wraps a Jobsupport (implements Job) and the jobParameters. Looking at JobLaunchingMessageHandlerIntegrationTests-context.xml , i assumed that by passing a testJob on the requests channel the testJob and its associated TestTasklet would be launched.
However, in SimpleJobLauncher run the jobexecution contains the reference to the jobsupport object which was passed along. Should it not have have looked up the reference to the testJob and started that job ? rather than invoking the execute method on the JobSupport("testJob") instance which is nothing ?
I think i may have misunderstood something ; do we have to do add something extra here ?
May 27th, 2011, 02:18 PM
i got around this by using the jobRegistry to locate the job at runtime.
i still however do not understand the point of the sample given in the launch example for spring-batch-integration.
Jun 15th, 2011, 02:36 PM
The spring batch admin integration provides great utility api to launch jobs. I have managed to integrate spring-batch-admin to my previous spring-batch job and launch them via message triggered job requests via spring-integration.
works great !
Tags for this Thread