Jul 2nd, 2009, 03:46 AM
JobOperator:start Vs jobLauncher:run
While JobLauncher:run(Job job, JobParameters jobParameters), accepts a JobParameters object as encapsulation of the job's parameters,
JobOperator:start(String jobName, String parameters), accepts a String as encapsulation of the job's parameters.
I realise there is a jobParametersConverter existing in between.
Would it be nice to have a
JobOperator:start(String jobName, JobParameters jobParameters) as well?
IMHO typically it would be easy to fill the JobParameters object than form a string to hold the parameters.
Jul 2nd, 2009, 01:42 PM
The idea with JobOperator was to restrict it to primitive types so that the client doesn't have to know about Spring Batch. You can easily write your own version of a service wrapping a JobLauncher, and follow the lead in JobOperator. We don't really need two ways to do the same thing in the framework.