[jboss-cvs] JBoss Messaging SVN: r8354 - branches/JBMESSAGING_1876/src/main/org/jboss/jms/tx.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jun 20 08:38:36 EDT 2011


Author: gaohoward
Date: 2011-06-20 08:38:36 -0400 (Mon, 20 Jun 2011)
New Revision: 8354

Modified:
   branches/JBMESSAGING_1876/src/main/org/jboss/jms/tx/ResourceManager.java
Log:
fix bugs


Modified: branches/JBMESSAGING_1876/src/main/org/jboss/jms/tx/ResourceManager.java
===================================================================
--- branches/JBMESSAGING_1876/src/main/org/jboss/jms/tx/ResourceManager.java	2011-06-20 12:14:10 UTC (rev 8353)
+++ branches/JBMESSAGING_1876/src/main/org/jboss/jms/tx/ResourceManager.java	2011-06-20 12:38:36 UTC (rev 8354)
@@ -201,7 +201,7 @@
       //if tx is mark rollback, roll back immediately
       if (tx.isRollbackOnly())
       {
-         this.rollbackLocal(xid);
+         this.rollbackLocal(xid, tx);
          throw new MessagingTransactionRolledBackException("Rolled back " + tx + " as it is marked rollback only!");
       }
                   
@@ -246,6 +246,16 @@
          throw new IllegalStateException("Cannot find transaction with xid:" + xid);         
       }
       
+      this.rollbackLocal(xid, ts);
+   }
+   
+   private void rollbackLocal(Object xid, ClientTransaction ts) throws JMSException
+   {
+      if (ts == null)
+      {      
+         throw new IllegalStateException("Cannot find transaction with xid:" + xid);         
+      }
+      
       // don't need messages for rollback
       // We don't clear the acks since we need to redeliver locally
       ts.clearMessages();



More information about the jboss-cvs-commits mailing list