Results 1 to 2 of 2

Thread: Inheriting tasklet transaction-manager attribute

  1. #1
    Join Date
    Feb 2009
    Posts
    10

    Default Inheriting tasklet transaction-manager attribute

    I am trying to enable my batch job steps to use or not use a transaction manager.
    In other words a batch job may have steps that require a TM and other steps that do not.
    I’m attempting to do this through the use of step inheritance

    I have a parent abstract step that looks like this:
    <batch:step id="parentStepNoJta" abstract="true" >
    <batch:tasklet transaction-manager="noTransactionManager" >
    <batch:listeners>
    <batch:listener class="…" />
    </batch:listeners>
    </batch:tasklet>
    </batch:step>

    In my Spring batch job configuration if have the following step:
    <batch:step id="logMessageStep" parent="parentStepNoJta">
    <batch:tasklet ref="logMessage" >
    </batch:tasklet>
    </batch:step>

    However the transaction-manager attribute is not being inherited in my concrete step.
    Instead the normal transaction-manager bean is being used.
    Am I missing something or do I not understand how this works?

    Thanks,
    Ed

  2. #2
    Join Date
    Feb 2008
    Posts
    488

Posting Permissions

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