Class RegisteredSynchronization
java.lang.Object
org.hibernate.resource.transaction.backend.jta.internal.synchronization.RegisteredSynchronization
- All Implemented Interfaces:
Synchronization
The JTA
Synchronization Hibernate registers when needed for JTA callbacks.
Note that we split the notion of the registered Synchronization and the processing of the Synchronization callbacks mainly to account for "separation of concerns", but also so that the transaction engine does not have to hold reference to the actual Synchronization that gets registered with the JTA system.
- Author:
- Steve Ebersole
-
Constructor Summary
ConstructorsConstructorDescriptionRegisteredSynchronization(SynchronizationCallbackCoordinator synchronizationCallbackCoordinator) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterCompletion(int status) This method is called by the transaction manager after the transaction is committed or rolled back.voidThe beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process.
-
Constructor Details
-
RegisteredSynchronization
public RegisteredSynchronization(SynchronizationCallbackCoordinator synchronizationCallbackCoordinator)
-
-
Method Details
-
beforeCompletion
public void beforeCompletion()Description copied from interface:SynchronizationThe beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process. This call is executed with the transaction context of the transaction that is being committed.- Specified by:
beforeCompletionin interfaceSynchronization
-
afterCompletion
public void afterCompletion(int status) Description copied from interface:SynchronizationThis method is called by the transaction manager after the transaction is committed or rolled back.- Specified by:
afterCompletionin interfaceSynchronization- Parameters:
status- The status of the transaction completion.
-