mirror of https://github.com/apache/activemq.git
attempted patch to issue brought up on the user list: http://www.nabble.com/AMQ-4.0-with-Oracle-Persistence-and-XA-Transactions-tf1888956.html#a5165822
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418993 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0c2c5c6a19
commit
9324b597ac
|
@ -52,7 +52,10 @@ public class TransactionContext {
|
||||||
if( connection == null ) {
|
if( connection == null ) {
|
||||||
try {
|
try {
|
||||||
connection = dataSource.getConnection();
|
connection = dataSource.getConnection();
|
||||||
connection.setAutoCommit(!inTx);
|
boolean autoCommit = !inTx;
|
||||||
|
if (connection.getAutoCommit() != autoCommit) {
|
||||||
|
connection.setAutoCommit(autoCommit);
|
||||||
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
JDBCPersistenceAdapter.log("Could not get JDBC connection: ", e);
|
JDBCPersistenceAdapter.log("Could not get JDBC connection: ", e);
|
||||||
throw IOExceptionSupport.create(e);
|
throw IOExceptionSupport.create(e);
|
||||||
|
|
Loading…
Reference in New Issue