Results 1 to 3 of 3

Thread: Legacy integration - tasklet transaction

  1. #1
    Join Date
    Nov 2010
    Posts
    9

    Default Legacy integration - tasklet transaction

    Hi i am trying to convert a legacy system to spring batch.
    possibly i am thinking of having 2 steps for my job configuration.
    1. step1 -This step is like pre processing for the job. i am thinking of using a class that implements tasklet interface(org.springframework.batch.core.step.task let). this tasklet needs to make multiple service calls, each service being in its own transaction.I read in documentation that tasklet is already in a transaction initiated by spring batch. how can i disable this transaction?
    all these multiple service calls do not need be wrapped in a transaction. if one of them fails, the processing can stop there, and job can end.
    2. step 2 -(begins on sucess of step 1) simple step reading rows from database possibly using jdbc reader and process row by row, writes them back to db possibly using a

    thanks
    Sid

  2. #2
    Join Date
    Dec 2005
    Location
    Lyon, France
    Posts
    311

    Default

    for no transaction in a tasklet, this should do the job:

    Code:
    <tasklet ref="someTasklet">
      <transaction-attributes propagation="NEVER"/>				
    </tasklet>

  3. #3
    Join Date
    Nov 2010
    Posts
    9

    Default thanks

    thanks Arno

Posting Permissions

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