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) 

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@372805 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-01-27 10:16:16 +00:00
parent 8fbbd24122
commit 2f944a19e3
1 changed files with 5 additions and 0 deletions

View File

@ -100,6 +100,10 @@ public class TransactionContext {
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 @@ public class TransactionContext {
connection.commit();
}
}
*/
} catch (SQLException e) {
throw IOExceptionSupport.create(e);
} finally {