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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 21 05:14:48 EDT 2012


Author: gaohoward
Date: 2012-06-21 05:14:48 -0400 (Thu, 21 Jun 2012)
New Revision: 8539

Modified:
   branches/Branch_1_4/src/main/org/jboss/jms/tx/ResourceManager.java
Log:
JBMESSAGING-1926
adding more logs before exception.


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	2012-06-04 15:28:04 UTC (rev 8538)
+++ branches/Branch_1_4/src/main/org/jboss/jms/tx/ResourceManager.java	2012-06-21 09:14:48 UTC (rev 8539)
@@ -735,12 +735,16 @@
                //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);
+               MessagingXAException xaEx = new MessagingXAException(XAException.XA_RETRY, "A Throwable was caught in sending the transaction", t);
+               log.debug("A Throwable was caught in sending the transaction: " + t, xaEx);
+               throw xaEx;
             }
             else
             {
                //https://jira.jboss.org/jira/browse/JBMESSAGING-1734
-               throw new MessagingXAException(XAException.XA_RBCOMMFAIL, "A Throwable was caught in sending the transaction", t);
+               MessagingXAException xaEx = new MessagingXAException(XAException.XA_RBCOMMFAIL, "A Throwable was caught in sending the transaction", t);
+               log.debug("A Throwable was caught in sending the transaction: " + t, xaEx);
+               throw xaEx;
             }            
          }
          else if (request.getRequestType() == TransactionRequest.ONE_PHASE_COMMIT_REQUEST)
@@ -748,19 +752,25 @@
             //for one-phase commit, we may have a rollback exeption
             if (t instanceof XAException)
             {
-               throw new MessagingXAException(XAException.XA_RBOTHER, "A Throwable was caught in sending one phase commit", t);
+               MessagingXAException xaEx = new MessagingXAException(XAException.XA_RBOTHER, "A Throwable was caught in sending one phase commit", t);
+               log.debug("A Throwable was caught in sending one phase commit: " + t, xaEx);
+               throw xaEx;
             }
             else
             {
-               throw new MessagingXAException(XAException.XA_RETRY, "A Throwable was caught in sending one phase commit", t);            
+               MessagingXAException xaEx = new MessagingXAException(XAException.XA_RETRY, "A Throwable was caught in sending one phase commit", t);
+               log.debug("A Throwable was caught in sending one phase commit: " + t, xaEx);
+               throw xaEx;            
             }
          }
          else
          {
-            throw new MessagingXAException(XAException.XA_RETRY, "A Throwable was caught in sending the transaction", t);            
+            MessagingXAException xaEx = new MessagingXAException(XAException.XA_RETRY, "A Throwable was caught in sending the transaction", t);
+            log.debug("A Throwable was caught in sending the transaction: " + t, xaEx);
+            throw xaEx;            
          }
       }
    }
-   
+
    // Inner Classes --------------------------------------------------------------------------------
 }



More information about the jboss-cvs-commits mailing list