站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

TransactionSynchronizationUtils (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.transaction.support
Class TransactionSynchronizationUtils

java.lang.Object
  extended by org.springframework.transaction.support.TransactionSynchronizationUtils

public abstract class TransactionSynchronizationUtils
extends Object

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

Since:
2.0
Author:
Juergen Hoeller
See Also:
TransactionSynchronization, TransactionSynchronizationManager.getSynchronizations()

Constructor Summary
TransactionSynchronizationUtils()
           
 
Method Summary
static void invokeAfterCommit(List synchronizations)
          Actually invoke the afterCommit methods of the given Spring TransactionSynchronization objects.
static void invokeAfterCompletion(List synchronizations, int completionStatus)
          Actually invoke the afterCompletion methods of the given Spring TransactionSynchronization objects.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionSynchronizationUtils

public TransactionSynchronizationUtils()
Method Detail

triggerBeforeCommit

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
See Also:
TransactionSynchronization.beforeCommit(boolean)

triggerBeforeCompletion

public static void triggerBeforeCompletion()
Trigger beforeCompletion callbacks on all currently registered synchronizations.

See Also:
TransactionSynchronization.beforeCompletion()

triggerAfterCommit

public static void triggerAfterCommit()
Trigger afterCommit callbacks on all currently registered synchronizations.

Throws:
RuntimeException - if thrown by a afterCommit callback
See Also:
TransactionSynchronizationManager.getSynchronizations(), TransactionSynchronization.afterCommit()

invokeAfterCommit

public static void invokeAfterCommit(List synchronizations)
Actually invoke the afterCommit methods of the given Spring TransactionSynchronization objects.

Parameters:
synchronizations - List of TransactionSynchronization objects
See Also:
TransactionSynchronization.afterCommit()

triggerAfterCompletion

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
See Also:
TransactionSynchronizationManager.getSynchronizations(), TransactionSynchronization.afterCompletion(int), TransactionSynchronization.STATUS_COMMITTED, TransactionSynchronization.STATUS_ROLLED_BACK, TransactionSynchronization.STATUS_UNKNOWN

invokeAfterCompletion

public static void invokeAfterCompletion(List 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
See Also:
TransactionSynchronization.afterCompletion(int), TransactionSynchronization.STATUS_COMMITTED, TransactionSynchronization.STATUS_ROLLED_BACK, TransactionSynchronization.STATUS_UNKNOWN

The Spring Framework

Copyright © 2002-2007 The Spring Framework.