Fix doCleanupAfterCompletion invocation
doCleanupAfterCompletion gets now subscribed to when processing cleanup after a new transaction.
This commit is contained in:
committed by
Juergen Hoeller
parent
ec8689d1fc
commit
9cff07ce35
@@ -676,17 +676,18 @@ public abstract class AbstractReactiveTransactionManager implements ReactiveTran
|
||||
if (status.isNewSynchronization()) {
|
||||
synchronizationManager.clear();
|
||||
}
|
||||
Mono<Void> cleanup = Mono.empty();
|
||||
if (status.isNewTransaction()) {
|
||||
doCleanupAfterCompletion(synchronizationManager, status.getTransaction());
|
||||
cleanup = doCleanupAfterCompletion(synchronizationManager, status.getTransaction());
|
||||
}
|
||||
if (status.getSuspendedResources() != null) {
|
||||
if (status.isDebug()) {
|
||||
logger.debug("Resuming suspended transaction after completion of inner transaction");
|
||||
}
|
||||
Object transaction = (status.hasTransaction() ? status.getTransaction() : null);
|
||||
return resume(synchronizationManager, transaction, (SuspendedResourcesHolder) status.getSuspendedResources());
|
||||
return cleanup.then(resume(synchronizationManager, transaction, (SuspendedResourcesHolder) status.getSuspendedResources()));
|
||||
}
|
||||
return Mono.empty();
|
||||
return cleanup;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user