Results 1 to 2 of 2

Thread: How to initialise per job rather than per item?

  1. #1
    Join Date
    Jul 2010
    Posts
    14

    Post How to initialise per job rather than per item?

    Hi,

    How would one go about executing code on a per job basis rather than per item?

    For example, if you wanted to send an email for each row returned from a DB call. So you process each row as an item, but the email template is the same for each person (which let's just say is retrieved/concocted using some non-trivial processing) so you only want to call that once as opposed to for each item n number of times.

    Is there a common strategy for this kind of scenario using Spring Batch?

    Thanks in advance,
    G.

  2. #2
    Join Date
    Jul 2010
    Posts
    14

    Default

    One answer is using a Tasklet and just do all the processing in one place. Any others though?

Posting Permissions

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