| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.transaction.support.TransactionSynchronizationUtils
public abstract class TransactionSynchronizationUtils
Utility methods for triggering specific TransactionSynchronization
 callback methods on all currently registered synchronizations.
TransactionSynchronization, 
TransactionSynchronizationManager.getSynchronizations()| Constructor Summary | |
|---|---|
| TransactionSynchronizationUtils() | |
| Method Summary | |
|---|---|
| static void | invokeAfterCommit(List synchronizations)Actually invoke the afterCommitmethods of the
 given Spring TransactionSynchronization objects. | 
| static void | invokeAfterCompletion(List 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. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public TransactionSynchronizationUtils()
| Method Detail | 
|---|
public static boolean sameResourceFactory(ResourceTransactionManager tm,
                                          Object resourceFactory)
ResourceTransactionManager.getResourceFactory(), 
InfrastructureProxy.getWrappedObject()public static void triggerBeforeCommit(boolean readOnly)
beforeCommit callbacks on all currently registered synchronizations.
readOnly - whether the transaction is defined as read-only transaction
RuntimeException - if thrown by a beforeCommit callbackTransactionSynchronization.beforeCommit(boolean)public static void triggerBeforeCompletion()
beforeCompletion callbacks on all currently registered synchronizations.
TransactionSynchronization.beforeCompletion()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(List synchronizations)
afterCommit methods of the
 given Spring TransactionSynchronization objects.
synchronizations - 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_UNKNOWN
public static void invokeAfterCompletion(List synchronizations,
                                         int completionStatus)
afterCompletion methods of the
 given Spring TransactionSynchronization objects.
synchronizations - 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| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||