[jbossts-issues] [JBoss JIRA] (JBTM-2888) NestedTopLevel transactions do not rollback state on exception

Michael Musgrove (JIRA) issues at jboss.org
Tue Apr 25 12:35:00 EDT 2017


Michael Musgrove created JBTM-2888:
--------------------------------------

             Summary: NestedTopLevel transactions do not rollback state on exception
                 Key: JBTM-2888
                 URL: https://issues.jboss.org/browse/JBTM-2888
             Project: JBoss Transaction Manager
          Issue Type: Bug
          Components: STM
    Affects Versions: 5.5.24.Final
            Reporter: Michael Musgrove
            Assignee: Mark Little


The attached file is a reproducer. Drop it into the STM tests directory and run to see the failure.

It creates two transactional objects A and B. B is further annotated with @NestedTopLevel. The test:
- starts a transaction A;
- calls a write method on A;
- then calls a write method on B which throws an exception;
- aborts or commits A (either outcome produces the error)

Since the container starts a top-level transaction for the call to the method on B I would expect it to abort it if the B method throws an exception. What I find is that it will always call commit. 

This behaviour limits the usefulness of @NestedTopLevel when such methods are called inside an existing transaction since there is no mechanism for rolling back changes.





--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbossts-issues mailing list