mirror of https://github.com/apache/activemq.git
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) git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@372805 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8fbbd24122
commit
2f944a19e3
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue