I discovered the source of the issue.  When a UserTransaction times out the 
tx.getStatus() == Status.STATUS_MARKED_ROLLBACK. 

After a timeout,  my next servlet call would fetch the UserTransaction object 
via JNDI and JBoss was happy to hand it back the last transaction in progress ( 
the dead, timed out one).

Previously on requesting a transaction I had only been checking for either 
Status.STATUS_ACTIVE or Status.STATUS_NO_TRANSACTION.  In this case I needed to 
check for the STATUS_MARKED_ROLLBACK condition and explicitly call 
tx.rollback() and tx.begin() so that my next DataSource.getConnection wouldn't 
try to use the dead transaction.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3923659#3923659

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3923659


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to