Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 95356 invoked from network); 4 Jul 2006 12:13:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Jul 2006 12:13:47 -0000 Received: (qmail 65591 invoked by uid 500); 4 Jul 2006 12:13:47 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 65556 invoked by uid 500); 4 Jul 2006 12:13:47 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 65547 invoked by uid 99); 4 Jul 2006 12:13:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jul 2006 05:13:46 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jul 2006 05:13:46 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 3ED201A983A; Tue, 4 Jul 2006 05:13:26 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r418993 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java Date: Tue, 04 Jul 2006 12:13:25 -0000 To: activemq-commits@geronimo.apache.org From: jstrachan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060704121326.3ED201A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: jstrachan Date: Tue Jul 4 05:13:25 2006 New Revision: 418993 URL: http://svn.apache.org/viewvc?rev=418993&view=rev Log: attempted patch to issue brought up on the user list: http://www.nabble.com/AMQ-4.0-with-Oracle-Persistence-and-XA-Transactions-tf1888956.html#a5165822 Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java?rev=418993&r1=418992&r2=418993&view=diff ============================================================================== --- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java (original) +++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java Tue Jul 4 05:13:25 2006 @@ -52,7 +52,10 @@ if( connection == null ) { try { connection = dataSource.getConnection(); - connection.setAutoCommit(!inTx); + boolean autoCommit = !inTx; + if (connection.getAutoCommit() != autoCommit) { + connection.setAutoCommit(autoCommit); + } } catch (SQLException e) { JDBCPersistenceAdapter.log("Could not get JDBC connection: ", e); throw IOExceptionSupport.create(e);