Open
Description
Gaetan Pitteloud opened BATCH-824 and commented
One of our batch developer wants to programmatically rollback the transaction in a batch, by invoking TransactionStatus.setRollbackOnly() on the status returned by the transaction manager.
The problem is that the tx status is only local to the doExecute() method of the ItemOrientedStep, and there is no way to access it. Would it be possible to share it, e.g. in a ThreadLocal, in the same way transaction support for aop is achieved ? ItemReader and ItemWriter would then be able to programmatically rollback without throwing an exception.
Affects: 1.1.2, 2.0.0.M1