[jboss-cvs] JBoss Messaging SVN: r8585 - branches/JBossMessaging_1_4_7_GA_JBMessaging-1926/src/main/org/jboss/jms/tx.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 5 05:52:45 EST 2013
Author: raggz
Date: 2013-02-05 05:52:45 -0500 (Tue, 05 Feb 2013)
New Revision: 8585
Modified:
branches/JBossMessaging_1_4_7_GA_JBMessaging-1926/src/main/org/jboss/jms/tx/ResourceManager.java
Log:
Back port of JBMessaging-1926 (see JBPAPP-10623)
Modified: branches/JBossMessaging_1_4_7_GA_JBMessaging-1926/src/main/org/jboss/jms/tx/ResourceManager.java
===================================================================
--- branches/JBossMessaging_1_4_7_GA_JBMessaging-1926/src/main/org/jboss/jms/tx/ResourceManager.java 2013-02-05 10:06:01 UTC (rev 8584)
+++ branches/JBossMessaging_1_4_7_GA_JBMessaging-1926/src/main/org/jboss/jms/tx/ResourceManager.java 2013-02-05 10:52:45 UTC (rev 8585)
@@ -691,17 +691,39 @@
//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)
+ {
+ //for one-phase commit, we may have a rollback exeption
+ if (t instanceof XAException)
+ {
+ 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
+ {
+ 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;
}
}
}
More information about the jboss-cvs-commits
mailing list