@Override public final void commit(TransactionContext ctx) { Deque<Savepoint> savepoints = savepoints(ctx.configuration()); Savepoint savepoint = savepoints.pop(); // [#3489] Explicitly release savepoints prior to commit if (savepoint != null && savepoint != UNSUPPORTED_SAVEPOINT && savepoint != IGNORED_SAVEPOINT) try { connection(ctx.configuration()).releaseSavepoint(savepoint); } // [#3537] Ignore those cases where the JDBC driver incompletely implements the API // See also http://stackoverflow.com/q/10667292/521799 catch (DataAccessException ignore) {} // This is the top-level transaction if (savepoints.isEmpty()) { connection(ctx.configuration()).commit(); brace(ctx.configuration(), false); } // Nested commits have no effect else { } }