Skip to content

support for setRollbackOnly() in chunk transaction [BATCH-824] #2752

Open
@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions