[jboss-jira] [JBoss JIRA] Created: (JBAS-6663) UserTransaction.rollback() must not throw IllegalStateException if getStatus()==STATUS_ROLLEDBACK
Jörg von Frantzius (JIRA)
jira-events at lists.jboss.org
Tue Mar 24 10:12:05 EDT 2009
UserTransaction.rollback() must not throw IllegalStateException if getStatus()==STATUS_ROLLEDBACK
-------------------------------------------------------------------------------------------------
Key: JBAS-6663
URL: https://jira.jboss.org/jira/browse/JBAS-6663
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Transaction Manager (Arjuna)
Affects Versions: JBossAS-4.2.3.GA
Reporter: Jörg von Frantzius
Assignee: Jonathan Halliday
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list