[jboss-cvs] JBossAS SVN: r57255 - branches/JBoss_4_0_3_SP1_CP/server/src/main/org/jboss/jms/asf

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Sep 27 23:17:28 EDT 2006


Author: ryan.campbell at jboss.com
Date: 2006-09-27 23:17:27 -0400 (Wed, 27 Sep 2006)
New Revision: 57255

Modified:
   branches/JBoss_4_0_3_SP1_CP/server/src/main/org/jboss/jms/asf/StdServerSession.java
Log:
ASPATCH-65: JBAS-3635: JBAS-3631 Missing branch in StdServerSession commit logic

Modified: branches/JBoss_4_0_3_SP1_CP/server/src/main/org/jboss/jms/asf/StdServerSession.java
===================================================================
--- branches/JBoss_4_0_3_SP1_CP/server/src/main/org/jboss/jms/asf/StdServerSession.java	2006-09-28 03:17:24 UTC (rev 57254)
+++ branches/JBoss_4_0_3_SP1_CP/server/src/main/org/jboss/jms/asf/StdServerSession.java	2006-09-28 03:17:27 UTC (rev 57255)
@@ -309,7 +309,7 @@
             }
             else
             {
-               // Use the TM to commit the Tx (assert the correct association) 
+               // Use the TM to commit the Tx (assert the correct association)
                Transaction currentTx = tm.getTransaction();
                if (trans.equals(currentTx) == false)
                   throw new IllegalStateException("Wrong tx association: expected " + trans + " was " + currentTx);
@@ -321,7 +321,7 @@
                      log.trace("Rolling back JMS transaction");
                   // actually roll it back
                   tm.rollback();
-                  
+
                   // NO XASession? then manually rollback.
                   // This is not so good but
                   // it's the best we can do if we have no XASession.
@@ -347,7 +347,22 @@
                      session.commit();
                   }
                }
-            }            
+               else
+               {
+                  if (trace)
+                     log.trace(StdServerSession.this + " transaction already ended tx=" + trans);
+                  // spend the thread association
+                  tm.suspend();
+
+                  // NO XASession? then manually rollback.
+                  // This is not so good but
+                  // it's the best we can do if we have no XASession.
+                  if (xaSession == null && serverSessionPool.isTransacted())
+                  {
+                     session.rollback();
+                  }
+               }
+            }
          }
          catch (Exception e)
          {




More information about the jboss-cvs-commits mailing list