I couldn't reproduce the previous test failures locally.  With this change,
we handle the NO_TRANSACTION (and other unexpected tx.status) by throwing
RollbackException("Transaction '%s' has unexpected status '%d'"...)

I'm not sure if I like the switch or if/else but noticed other parts of the
EJB3 codebase using switch, so I switched ;)

I'm also not sure that I like this change yet, would like to see the test
suite results...


On Tue, May 21, 2013 at 7:04 PM, Stuart Douglas <notifications@github.com>wrote:

> In ejb3/src/main/java/org/jboss/as/ejb3/tx/CMTTxInterceptor.java:
>
> >                  tm.rollback();
> > +            } else if (status == Status.STATUS_ROLLEDBACK) {
> > +                throw EjbMessages.MESSAGES.transactionAlreadyRolledBack(tx);
> > +            } else if (status == Status.STATUS_ROLLING_BACK) {
>
> I think you also need to check for NO_TRANSACTION here, in case the
> transaction has already been rolled back and disasociated. This should not
> happen if everyone is being spec compliant, but I think it may happen in
> the real world.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/wildfly/wildfly/pull/4534/files#r4328939>
> .
>