How to configure NESTED transactions
I am trying to configure a Logical Unit of Work for the RestartSample. I have modified RestartFunctionalTests so that there is only one invokation of runJob() . The end game is to rollback ALL updates in the Step on the BatchCriticalException i.e. atomic operation = whole step complete.
I have configured the processor to use NESTED transaction propogation via Spring AOP (listed below), however when I run the RestartSample only a partial rollback is observered i.e. some records are commited. I have tried commenting out commit interval but no change.
I it possible to configure Spring Batch to use NESTED transaction? If so how does this interact with commit interval settings? Are they conficting requirements?
<aop:config>
<aop:advisor pointcut="execution(* org.springframework.batch.sample.item..*Processor+ .*(..))"
advice-ref="txAdvice2" />
</aop:config>
<tx:advice id="txAdvice2" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*" propagation="NESTED" />
</tx:attributes>
</tx:advice>