geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r733049 - /geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Date Fri, 09 Jan 2009 14:38:41 GMT
Author: linsun
Date: Fri Jan  9 06:38:41 2009
New Revision: 733049

URL: http://svn.apache.org/viewvc?rev=733049&view=rev
Log:
prevent one phase commit continue into 2 phase commit, should fix unit test in geronimo-connector

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

Modified: geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java?rev=733049&r1=733048&r2=733049&view=diff
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
(original)
+++ geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Fri Jan  9 06:38:41 2009
@@ -302,8 +302,9 @@
             if (resourceManagers.size() == 1) {
                 TransactionBranch manager = (TransactionBranch) resourceManagers.getFirst();
                 commitResource(manager);
-            }
-
+                return;
+            } 
+            
             boolean willCommit = false;
             try {
                 // two-phase
@@ -313,7 +314,6 @@
                 throw e;
             }
             
-
             // notify the RMs
             if (willCommit) {
                 commitResources(resourceManagers);
@@ -404,7 +404,6 @@
 
     //helper method used by Transaction.commit and XATerminator prepare.
     private boolean internalPrepare() throws SystemException {
-
         for (Iterator rms = resourceManagers.iterator(); rms.hasNext();) {
             synchronized (this) {
                 if (status != Status.STATUS_PREPARING) {



Mime
View raw message