List of usage examples for org.springframework.transaction.reactive TransactionSynchronizationManager registerSynchronization
public void registerSynchronization(TransactionSynchronization synchronization) throws IllegalStateException
From source file:org.springframework.transaction.reactive.AbstractReactiveTransactionManager.java
/** * Reactivate transaction synchronization for the current transaction context * and resume all given synchronizations. * @param synchronizationManager the synchronization manager bound to the current transaction * @param suspendedSynchronizations a List of TransactionSynchronization objects */// ww w . j av a2 s . c o m private Mono<Void> doResumeSynchronization(TransactionSynchronizationManager synchronizationManager, List<TransactionSynchronization> suspendedSynchronizations) { synchronizationManager.initSynchronization(); return Flux.fromIterable(suspendedSynchronizations) .concatMap(synchronization -> synchronization.resume() .doOnSuccess(ignore -> synchronizationManager.registerSynchronization(synchronization))) .then(); }