Results 1 to 2 of 2

Thread: JobOperator:start Vs jobLauncher:run

  1. #1
    Join Date
    Feb 2009
    Posts
    25

    Default 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.

    Thoughts?
    Thanks,
    Deva

  2. #2
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •