Results 1 to 3 of 3

Thread: Example for parallel processing

  1. #1

    Question Example for parallel processing

    hi,
    I need to run a job concurrently within a single JVM (Later in multiple jvm's). I would appreciate if anyone tell me how to achieve that. Also please provide an example if you can.

    regards,
    Kris

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

    Default

    TaskExecutorRepeatTemplate is the key. Plus you have to be aware that there is no support for Restartable in this case, however you can still have partial failures and restarts as long as you control the data and mark each input record as processed transactionally - then when a job restarts it only selects input data that were not already processed. We have client projects using this approach so it definitely works.

    There isn't a sample job yet (really you should check that parallel processing is necessary before jumping into it, so we have tried not to encourage people to get too excited about it). But the unit tests AsynchronousRepeatTests give you some clues as to what to expect at a low level. You will need to add the TaskExecutorRepeatTemplate to your job (e.g. through the StepConfiguration) as the stepOperations property.

  3. #3
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    I added a parallelJob.xml to the samples so you can see how to do this in concrete terms. It's a slightly artificial example since parallel processing really wasn't necessary here, but you can see the patterns. We will be providing more native support, probably after 1.0.

Posting Permissions

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