-
Bug
-
Resolution: Obsolete
-
Major
-
JBossAS-4.2.3.GA
-
None
When a timeout has occurred, UserTransaction.getStatus() returns STATUS_ROLLEDBACK. Calling UserTransaction.rollback() at this point will throw the following IllegalStateException:
java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not active!
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1473)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:163)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:126)
at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.rollback(ServerVMClientUserTransaction.java:148)
The JTA specification says about when UserTransaction.rollback() may throw IllegalStateException: "IllegalStateException Thrown if the current thread is not associated with a transaction." Since getStatus() does return STATUS_ROLLEDBACK (and not STATUS_NO_TRANSACTION), the thread obviously still is associated with a transaction.
Apart from breaking the JTA contract, this effectively renders the UserTransaction useless since begin() will also throw exception.
- is blocked by
-
JBTM-517 Ignore abort on aborted transactions
- Closed