geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r735100 - /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Date Fri, 16 Jan 2009 19:50:52 GMT
Author: linsun
Date: Fri Jan 16 11:50:51 2009
New Revision: 735100

URL: http://svn.apache.org/viewvc?rev=735100&view=rev
Log:
GERONIMO-4519 When XAException.XA_RBROLLBACK arisen from XAResource.end, TM should not send
rollback request again to the XAResource

Modified:
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java?rev=735100&r1=735099&r2=735100&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Fri Jan 16 11:50:51 2009
@@ -475,10 +475,10 @@
                 default:
                     throw new IllegalStateException("Status is " + getStateString(status));
             }
-            rms = resourceManagers;
         }
 
         endResources();
+        rms = resourceManagers;
         try {
             rollbackResources(rms);
             //only write rollback record if we have already written prepare record.
@@ -573,6 +573,11 @@
                 log.warn("Error ending association for XAResource " + xaRes + "; transaction
will roll back. XA error code: " + e.errorCode, e);
                 synchronized (this) {
                     status = Status.STATUS_MARKED_ROLLBACK;
+                    // when XAException is XA_RBROLLBACK, which indicates that XAResource
has already rolled back the transaction, no need
+                    // to send rollback request to the XAResource, thus remove it off resourceManagers
list.
+                    if (e.errorCode == XAException.XA_RBROLLBACK) {
+                        resourceManagers.remove(manager);
+                    }
                 }
             }
         }



Mime
View raw message