We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2ef90a7 + a74bba1 commit 674de26Copy full SHA for 674de26
ebean-datasource/src/main/java/io/ebean/datasource/pool/PooledConnection.java
@@ -259,6 +259,17 @@ void closeConnectionFully(boolean logErrors) {
259
Log.warn("Error when closing connection Statements", ex);
260
}
261
262
+ try {
263
+ // DB2 (and some other DBMS) may have uncommitted changes and do not allow close
264
+ // so try to do a rollback.
265
+ if (!connection.getAutoCommit()) {
266
+ connection.rollback();
267
+ }
268
+ } catch (SQLException ex) {
269
+ if (logErrors) {
270
+ Log.warn("Could not perform rollback", ex);
271
272
273
try {
274
connection.close();
275
pool.dec();
0 commit comments