[
http://jira.jboss.com/jira/browse/JBAS-4481?page=comments#action_12365532 ]
Jonathan Halliday commented on JBAS-4481:
-----------------------------------------
Per Andy Miller's suggestion I took a look at CachedConnectionValve. This is the
interceptor that should catch poorly behaved apps trying to return Threads to the pool
with open connections or unresolved transactions. However, it will be seeing a transaction
in state STATUS_ROLLEDBACK, which it does not know how to deal with. It should really call
rollback in this case (and expect rollback to throw an IllegalStateException). However,
the application code should not be giving it a dirty Thread in the first place. If the
application starts a transaction it should always call commit, rollback or suspend before
surrendering the Thread. The JBossTS will only disassociate the transaction from the
Thread on these calls, even if it's been ended by another Thread.
Transaction timeouts leave garbage Status.ROLLEDBACK UserTransaction
object bound to the thread
-----------------------------------------------------------------------------------------------
Key: JBAS-4481
URL:
http://jira.jboss.com/jira/browse/JBAS-4481
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Transaction Manager
Affects Versions: JBossAS-4.2.0.GA
Reporter: Gavin King
Assigned To: Gavin King
Priority: Blocker
Fix For: JBossAS-4.2.1.CR1
Attachments: test4481.tar
If a transaction timeout occurs, the UserTransaction object does not get cleaned up from
the thread, even after the request ends and the thread returns to the pool. Future
requests will not be able to begin() a transaction, since the STATUS_ROLLEDBACK
UserTransaction throws this exception:
Caused by: javax.transaction.NotSupportedException
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:79)
at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:77)
at
org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:124)
at org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:29)
This means that any transaction timeout that occurs will leave the application server in
a permanently broken state and require a server restart. Hence 4.2.0.GA is currently
unusable in production!
This needs to be fixed in an immediate patch release.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira