[jboss-svn-commits] JBL Code SVN: r16346 - in labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP: ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Nov 5 10:35:09 EST 2007
Author: adinn
Date: 2007-11-05 10:35:09 -0500 (Mon, 05 Nov 2007)
New Revision: 16346
Modified:
labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java
labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionImple.java
Log:
patched SP branch for JBTM-245
Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java 2007-11-05 14:56:23 UTC (rev 16345)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java 2007-11-05 15:35:09 UTC (rev 16346)
@@ -1543,6 +1543,51 @@
}
}
+ /*
+ * need to do the same for all duplicated resources
+ */
+
+ el = _duplicateResources.keys();
+
+ if (el != null)
+ {
+ try
+ {
+ /*
+ * Would it gain us much to just loop for _suspendCount?
+ */
+
+ while (el.hasMoreElements())
+ {
+ /*
+ * Get the XAResource in case we have to call end on it.
+ */
+
+ XAResource xaRes = (XAResource) el.nextElement();
+ TxInfo info = (TxInfo) _duplicateResources.get(xaRes);
+
+ if (info.getState() == TxInfo.ASSOCIATION_SUSPENDED)
+ {
+ if (XAUtils.mustEndSuspendedRMs(xaRes))
+ xaRes.start(info.xid(), XAResource.TMRESUME);
+
+ xaRes.end(info.xid(), XAResource.TMSUCCESS);
+ info.setState(TxInfo.NOT_ASSOCIATED);
+ }
+ }
+ }
+ catch (XAException ex)
+ {
+ if (jtaLogger.loggerI18N.isWarnEnabled())
+ {
+ jtaLogger.loggerI18N
+ .warn("com.arjuna.ats.internal.jta.transaction.arjunacore.xaenderror");
+ }
+
+ result = false;
+ }
+ }
+
_suspendCount = 0;
}
Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionImple.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionImple.java 2007-11-05 14:56:23 UTC (rev 16345)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionImple.java 2007-11-05 15:35:09 UTC (rev 16346)
@@ -1480,7 +1480,47 @@
}
}
- _suspendCount = 0;
+ /*
+ * do the same again for duplicate resources
+ */
+
+ el = _duplicateResources.keys();
+
+ if (el != null)
+ {
+ try
+ {
+ while (el.hasMoreElements())
+ {
+ /*
+ * Get the XAResource in case we have to call end on it.
+ */
+
+ XAResource xaRes = (XAResource) el.nextElement();
+ TxInfo info = (TxInfo) _duplicateResources.get(xaRes);
+
+ if (info.getState() == TxInfo.ASSOCIATION_SUSPENDED)
+ {
+ if (XAUtils.mustEndSuspendedRMs(xaRes))
+ xaRes.start(info.xid(), XAResource.TMRESUME);
+
+ xaRes.end(info.xid(), XAResource.TMSUCCESS);
+ info.setState(TxInfo.NOT_ASSOCIATED);
+ }
+ }
+ }
+ catch (XAException ex)
+ {
+ if (jtaLogger.loggerI18N.isWarnEnabled())
+ {
+ jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.jts.xaenderror");
+ }
+
+ result = false;
+ }
+ }
+
+ _suspendCount = 0;
}
return result;
More information about the jboss-svn-commits
mailing list