activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
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 GMT
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);



Mime
View raw message