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.
1 parent e8c042e commit a74bba1Copy full SHA for a74bba1
ebean-datasource/src/main/java/io/ebean/datasource/pool/PooledConnection.java
@@ -254,6 +254,17 @@ void closeConnectionFully(boolean logErrors) {
254
Log.warn("Error when closing connection Statements", ex);
255
}
256
257
+ try {
258
+ // DB2 (and some other DBMS) may have uncommitted changes and do not allow close
259
+ // so try to do a rollback.
260
+ if (!connection.getAutoCommit()) {
261
+ connection.rollback();
262
+ }
263
+ } catch (SQLException ex) {
264
+ if (logErrors) {
265
+ Log.warn("Could not perform rollback", ex);
266
267
268
try {
269
connection.close();
270
pool.dec();
0 commit comments