git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418993 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-07-04 12:13:25 +00:00
parent 0c2c5c6a19
commit 9324b597ac
1 changed files with 4 additions and 1 deletions

View File

@ -52,7 +52,10 @@ public class TransactionContext {
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);