While configuring the jdbc auditor for MySQL data source, I got the following
error
ERROR - JdbcAuditor - Could not persist exchange
java.sql.SQLException: Can't call commit when autocommit=true
By default, MySQL starts new connections with autocommit enabled. So all the
calls to connection.commit(); would result in this error, like the way it is
done in jdbcAuditor
Connection connection = dataSource.getConnection();
try {
store(connection, id, data);
connection.commit();
} finally {
close(connection);
}
I think it should set the autocommit property to false, if it want to commit
the default transaction and start a new one
The other possible way is to use explicit transactions.
--
View this message in context:
http://www.nabble.com/jdbc-auditor-for-MySQL-data-source-autocommit-tf2889229s12049.html#a8071741
Sent from the ServiceMix - User mailing list archive at Nabble.com.