I confirmed that what I'm currently doing is performing appropriate rollback logic inside my local transaction commit() ... then I invoke the
ConnectionEventListener listener =
listener.localTransactionRolledback (new ConnectionEvent
I get the following warning on the console:
18:44:31,913 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=hyperactive/20, BranchQual=, localId=20] errorCode=XAER_PROTO
org.jboss.resource.connectionmanager.JBossLocalXAException: wrong xid in rollback: expected: null, got: XidImpl[FormatId=257, GlobalId=hyperactive/20, BranchQual=1, localId=20]
I've also tried simply throwing the exception out of the LocalTransaction.commit() and relying on JBoss to clean up. I still get the warning above but things look even worse (e.g. I can't shut down the server).
Other than the warning, the explicit rollback logic + notification seem to result in ok behavior. Is the warning to be taken as a serious problem? Or is there some way I can improve my logic to ensure that the warning is not raised.