|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.interface21.transaction.support.TransactionSynchronizationManager
Manages a list of transactions synchronizations per thread. Must be activated and deactivated by a transaction manager via init and clear. Automatically supported by AbstractPlatformTransactionManager, and thus all standard Spring transaction managers like JtaTransactionManager.
Resource management code should only register synchronizations when this manager is active, and perform resource cleanup immediately else. If transaction synchronization isn't active, there is either no current transaction, or the transaction manager doesn't support synchronizations.
E.g. used for Hibernate Session close calls when using JTA, for proper transactional handling of the JVM-level cache.
isActive(),
register(com.interface21.transaction.support.TransactionSynchronization),
TransactionSynchronization,
AbstractPlatformTransactionManager,
JtaTransactionManager,
SessionFactoryUtils.closeSessionIfNecessary(net.sf.hibernate.Session, net.sf.hibernate.SessionFactory)| Constructor Summary | |
TransactionSynchronizationManager()
|
|
| Method Summary | |
static void |
clear()
Deactivate thread synchronizations for the current thread. |
static void |
init()
Activate thread synchronizations for the current thread. |
static boolean |
isActive()
Return if thread synchronizations are active for the current thread. |
static void |
register(TransactionSynchronization synchronization)
Register a new JTA synchronization for the current thread. |
static void |
triggerAfterCompletion(int status)
Trigger afterCompletion calls for the current thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TransactionSynchronizationManager()
| Method Detail |
public static void init()
public static boolean isActive()
register(com.interface21.transaction.support.TransactionSynchronization)public static void register(TransactionSynchronization synchronization)
public static void triggerAfterCompletion(int status)
status - completion status according to TransactionSynchronization constantsTransactionSynchronizationpublic static void clear()
|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||