public abstract class TransactionSynchronizationUtils extends Object
TransactionSynchronization
 callback methods on all currently registered synchronizations.TransactionSynchronization, 
TransactionSynchronizationManager.getSynchronizations()| Constructor and Description | 
|---|
| TransactionSynchronizationUtils() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | invokeAfterCommit(List<TransactionSynchronization> synchronizations)Actually invoke the  afterCommitmethods of the
 given Spring TransactionSynchronization objects. | 
| static void | invokeAfterCompletion(List<TransactionSynchronization> synchronizations,
                     int completionStatus)Actually invoke the  afterCompletionmethods of the
 given Spring TransactionSynchronization objects. | 
| static boolean | sameResourceFactory(ResourceTransactionManager tm,
                   Object resourceFactory)Check whether the given resource transaction managers refers to the given
 (underlying) resource factory. | 
| static void | triggerAfterCommit()Trigger  afterCommitcallbacks on all currently registered synchronizations. | 
| static void | triggerAfterCompletion(int completionStatus)Trigger  afterCompletioncallbacks on all currently registered synchronizations. | 
| static void | triggerBeforeCommit(boolean readOnly)Trigger  beforeCommitcallbacks on all currently registered synchronizations. | 
| static void | triggerBeforeCompletion()Trigger  beforeCompletioncallbacks on all currently registered synchronizations. | 
| static void | triggerFlush()Trigger  flushcallbacks on all currently registered synchronizations. | 
public static boolean sameResourceFactory(ResourceTransactionManager tm, Object resourceFactory)
ResourceTransactionManager.getResourceFactory(), 
InfrastructureProxy.getWrappedObject()public static void triggerFlush()
flush callbacks on all currently registered synchronizations.RuntimeException - if thrown by a flush callbackTransactionSynchronization.flush()public static void triggerBeforeCommit(boolean readOnly)
beforeCommit callbacks on all currently registered synchronizations.readOnly - whether the transaction is defined as read-only transactionRuntimeException - if thrown by a beforeCommit callbackTransactionSynchronization.beforeCommit(boolean)public static void triggerBeforeCompletion()
beforeCompletion callbacks on all currently registered synchronizations.public static void triggerAfterCommit()
afterCommit callbacks on all currently registered synchronizations.RuntimeException - if thrown by a afterCommit callbackTransactionSynchronizationManager.getSynchronizations(), 
TransactionSynchronization.afterCommit()public static void invokeAfterCommit(@Nullable
                                     List<TransactionSynchronization> synchronizations)
afterCommit methods of the
 given Spring TransactionSynchronization objects.synchronizations - a List of TransactionSynchronization objectsTransactionSynchronization.afterCommit()public static void triggerAfterCompletion(int completionStatus)
afterCompletion callbacks on all currently registered synchronizations.completionStatus - the completion status according to the
 constants in the TransactionSynchronization interfaceTransactionSynchronizationManager.getSynchronizations(), 
TransactionSynchronization.afterCompletion(int), 
TransactionSynchronization.STATUS_COMMITTED, 
TransactionSynchronization.STATUS_ROLLED_BACK, 
TransactionSynchronization.STATUS_UNKNOWNpublic static void invokeAfterCompletion(@Nullable
                                         List<TransactionSynchronization> synchronizations,
                                         int completionStatus)
afterCompletion methods of the
 given Spring TransactionSynchronization objects.synchronizations - a List of TransactionSynchronization objectscompletionStatus - the completion status according to the
 constants in the TransactionSynchronization interfaceTransactionSynchronization.afterCompletion(int), 
TransactionSynchronization.STATUS_COMMITTED, 
TransactionSynchronization.STATUS_ROLLED_BACK, 
TransactionSynchronization.STATUS_UNKNOWN