activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r372805 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java
Date Fri, 27 Jan 2006 10:16:22 GMT
Author: jstrachan
Date: Fri Jan 27 02:16:16 2006
New Revision: 372805

URL: http://svn.apache.org/viewcvs?rev=372805&view=rev
Log:
added fix for issue reported on forum: http://forums.activemq.org/posts/list/0/60.page

where on startup we get the following exception when using mysql

java.io.IOException: Can't call commit when autocommit=true 
at org.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:44) 
at org.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:113) 
at org.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPersistenceAdapter.java:253)

at org.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:140) 

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/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java?rev=372805&r1=372804&r2=372805&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
Fri Jan 27 02:16:16 2006
@@ -100,6 +100,10 @@
     public void close() throws IOException {
         if( !inTx ) {
             try {
+                executeBatch();
+                
+                /**
+                 * we are not in a transaction so should not be committing
                 try{
                     executeBatch();
                 } finally {
@@ -107,6 +111,7 @@
                         connection.commit();
                     }
                 }
+                */
             } catch (SQLException e) {
                 throw IOExceptionSupport.create(e);
             } finally {



Mime
View raw message