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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Sep 18 08:49:07 EDT 2009


Author: gaohoward
Date: 2009-09-18 08:49:06 -0400 (Fri, 18 Sep 2009)
New Revision: 7814

Modified:
   branches/Branch_1_4/src/main/org/jboss/jms/tx/ResourceManager.java
Log:
JBMESSAGING-1734


Modified: branches/Branch_1_4/src/main/org/jboss/jms/tx/ResourceManager.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/tx/ResourceManager.java	2009-09-17 16:38:07 UTC (rev 7813)
+++ branches/Branch_1_4/src/main/org/jboss/jms/tx/ResourceManager.java	2009-09-18 12:49:06 UTC (rev 7814)
@@ -387,7 +387,7 @@
          
          request.xid = xid;      
          
-         sendTransactionXA(request, connection);        
+         sendTransactionXA(request, connection);
       }
       
       if (tx != null)
@@ -681,19 +681,26 @@
          //the server has been fixed.
          
          //(In some cases it will not be possible to fix so the user will have to manually resolve the tx)
-         
-         String oldBehaviour = System.getProperty("retain.oldxabehaviour");
-         if (oldBehaviour != null)
+         if (request.getRequestType() == TransactionRequest.TWO_PHASE_PREPARE_REQUEST)
          {
-            //Therefore we throw XA_RETRY
-            //Note we DO NOT throw XAER_RMFAIL or XAER_RMERR since both if these will cause the Arjuna
-            //tx mgr NOT to retry and the transaction will have to be resolve manually.
-            throw new MessagingXAException(XAException.XA_RETRY, "A Throwable was caught in sending the transaction", t);
+            
+            String oldBehaviour = System.getProperty("retain.oldxabehaviour");
+            if (oldBehaviour != null)
+            {
+               //Therefore we throw XA_RETRY
+               //Note we DO NOT throw XAER_RMFAIL or XAER_RMERR since both if these will cause the Arjuna
+               //tx mgr NOT to retry and the transaction will have to be resolve manually.
+               throw new MessagingXAException(XAException.XA_RETRY, "A Throwable was caught in sending the transaction", t);
+            }
+            else
+            {
+               //https://jira.jboss.org/jira/browse/JBMESSAGING-1734
+               throw new MessagingXAException(XAException.XA_RBCOMMFAIL, "A Throwable was caught in sending the transaction", t);
+            }            
          }
          else
          {
-            //https://jira.jboss.org/jira/browse/JBMESSAGING-1734
-            throw new MessagingXAException(XAException.XA_RBCOMMFAIL, "A Throwable was caught in sending the transaction", t);
+            throw new MessagingXAException(XAException.XA_RETRY, "A Throwable was caught in sending the transaction", t);            
          }
       }
    }




More information about the jboss-cvs-commits mailing list