Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 42941 invoked from network); 9 Jan 2009 14:39:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2009 14:39:03 -0000 Received: (qmail 62517 invoked by uid 500); 9 Jan 2009 14:39:03 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 62480 invoked by uid 500); 9 Jan 2009 14:39:03 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 62471 invoked by uid 99); 9 Jan 2009 14:39:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jan 2009 06:39:02 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jan 2009 14:39:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 660E62388988; Fri, 9 Jan 2009 06:38:41 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: scm@geronimo.apache.org From: linsun@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090109143841.660E62388988@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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) {