Skip to content

Commit 11278eb

Browse files
authored
Merge pull request #141 from ebean-orm/feature/init-autocommit-later
On Connection initialisation, setAutoCommit() mode later (after clientInfo etc)
2 parents f392671 + db124aa commit 11278eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ private Connection initConnection(Connection conn) throws SQLException {
439439
if (connectionInitializer != null) {
440440
connectionInitializer.preInitialize(conn);
441441
}
442-
conn.setAutoCommit(autoCommit);
443442
// isolation level is set globally for all connections (at least for H2) and
444443
// you will need admin rights - so we do not change it, if it already matches.
445444
if (conn.getTransactionIsolation() != transactionIsolation) {
@@ -475,6 +474,7 @@ private Connection initConnection(Connection conn) throws SQLException {
475474
}
476475
}
477476
}
477+
conn.setAutoCommit(autoCommit);
478478
if (connectionInitializer != null) {
479479
connectionInitializer.postInitialize(conn);
480480
}

0 commit comments

Comments
 (0)