I created WFLY-3731 for a "No transaction is running" ISE , that is
checks if the current transaction is not null and not STATUS_COMMITTED.
One obvious fix for WFLY-3731, would be to change
StatefulSessionSynchronizationInterceptor.processInvocation() to also
check for STATUS_ROLLEDBACK which would help my current case. Doing so
might defer clearing the transaction from the current thread, until we
later reached EJB container code (not really sure though, if we will
clear the ended tx).
But, what does it mean exactly for
StatefulSessionSynchronizationInterceptor.processInvocation() to see an
ended transaction? Seems to me that we missed our chance to register
the StatefulSessionSynchronization, so we won't run the
StatefulSessionSynchronization.afterCompletion() methods which I think
skips other logic (beforeCompletionMethod/afterCompletionMethod).
Currently, it looks like we just continue with the invocation as if
there is no current transaction (SFSB level lock appears to be released
after the invocation instead of after the transaction ends). Which
makes some sense since the transaction already ended.
When running the test case , I also see a JPA (EE) container level
failure as well which is reported as WFLY-3730.
show the exception that I see when the
transaction times out in a background (tm reaper) thread.
 test case is pushed to