Announcement Announcement Module
Collapse
No announcement yet.
Legacy integration - tasklet transaction Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    for no transaction in a tasklet, this should do the job:

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

    Comment


    • #3
      thanks

      thanks Arno

      Comment

      Working...
      X