mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-12 22:41:35 +00:00
#2262 - Transaction postCommit Callback not invoked when the active transaction has no database writes
This commit is contained in:
1 parent
6fb28d7ded
commit
8840628d34
2 files changed
+27
-5
No files matched your search
@@ -941,11 +941,13 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
*/
|
||||
private void connectionEndForQueryOnly() {
|
||||
try {
|
||||
withEachCallback(TransactionCallback::preCommit);
|
||||
if (onQueryOnly == OnQueryOnly.COMMIT) {
|
||||
performCommit();
|
||||
} else {
|
||||
performRollback();
|
||||
}
|
||||
withEachCallback(TransactionCallback::postCommit);
|
||||
} catch (SQLException e) {
|
||||
logger.error("Error when ending a query only transaction via " + onQueryOnly, e);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user