public abstract class

TransactionSynchronizationUtils

extends Object
java.lang.Object
   ↳ org.springframework.transaction.support.TransactionSynchronizationUtils

Class Overview

Utility methods for triggering specific TransactionSynchronization callback methods on all currently registered synchronizations.

Summary

Public Constructors
TransactionSynchronizationUtils()
Public Methods
static void invokeAfterCommit(List<TransactionSynchronization> synchronizations)
Actually invoke the afterCommit methods of the given Spring TransactionSynchronization objects.
static void invokeAfterCompletion(List<TransactionSynchronization> synchronizations, int completionStatus)
Actually invoke the afterCompletion methods 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 afterCommit callbacks on all currently registered synchronizations.
static void triggerAfterCompletion(int completionStatus)
Trigger afterCompletion callbacks on all currently registered synchronizations.
static void triggerBeforeCommit(boolean readOnly)
Trigger beforeCommit callbacks on all currently registered synchronizations.
static void triggerBeforeCompletion()
Trigger beforeCompletion callbacks on all currently registered synchronizations.
static void triggerFlush()
Trigger flush callbacks on all currently registered synchronizations.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TransactionSynchronizationUtils ()

Public Methods

public static void invokeAfterCommit (List<TransactionSynchronization> synchronizations)

Actually invoke the afterCommit methods of the given Spring TransactionSynchronization objects.

Parameters
synchronizations List of TransactionSynchronization objects
See Also

public static void invokeAfterCompletion (List<TransactionSynchronization> synchronizations, int completionStatus)

Actually invoke the afterCompletion methods of the given Spring TransactionSynchronization objects.

Parameters
synchronizations List of TransactionSynchronization objects
completionStatus the completion status according to the constants in the TransactionSynchronization interface

public static boolean sameResourceFactory (ResourceTransactionManager tm, Object resourceFactory)

Check whether the given resource transaction managers refers to the given (underlying) resource factory.

public static void triggerAfterCommit ()

Trigger afterCommit callbacks on all currently registered synchronizations.

Throws
RuntimeException if thrown by a afterCommit callback

public static void triggerAfterCompletion (int completionStatus)

Trigger afterCompletion callbacks on all currently registered synchronizations.

Parameters
completionStatus the completion status according to the constants in the TransactionSynchronization interface

public static void triggerBeforeCommit (boolean readOnly)

Trigger beforeCommit callbacks on all currently registered synchronizations.

Parameters
readOnly whether the transaction is defined as read-only transaction
Throws
RuntimeException if thrown by a beforeCommit callback

public static void triggerBeforeCompletion ()

Trigger beforeCompletion callbacks on all currently registered synchronizations.

public static void triggerFlush ()

Trigger flush callbacks on all currently registered synchronizations.

Throws
RuntimeException if thrown by a flush callback
See Also