Interface SynchronizationCallbackTarget
-
- All Known Implementing Classes:
JtaTransactionCoordinatorImpl
public interface SynchronizationCallbackTargetDefines "inflow" for JTA transactions from the perspective of Hibernate's registered JTA Synchronization back into the TransactionCoordinator by means of the SynchronizationCallbackCoordinator.That's a mouthful :) The way it works is like this...
-
Hibernate will register a JTA
Synchronizationimplementation (RegisteredSynchronization) which allows it to listen for completion of the JTA transaction. - That RegisteredSynchronization is given a SynchronizationCallbackCoordinator which it uses to route the transaction completion calls back into Hibernate. The SynchronizationCallbackCoordinator contract applies various behaviors around this process. See the impls for details.
- The SynchronizationCallbackCoordinator is handed a SynchronizationCallbackTarget which is the specific means for it to "route the transaction completion calls back into Hibernate". The SynchronizationCallbackTarget is most often the TransactionCoordinator impl or a direct delegate of the TransactionCoordinator impl. In that sense, SynchronizationCallbackTarget is the contract between the SynchronizationCallbackCoordinator and the TransactionCoordinator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidafterCompletion(boolean successful, boolean delayed)Callback of after-completion.voidbeforeCompletion()Callback of before-completion.booleanisActive()Is the callback target still active? Generally this is checked by the caller prior to callingbeforeCompletion()orafterCompletion(boolean, boolean)
-
-
-
Method Detail
-
isActive
boolean isActive()
Is the callback target still active? Generally this is checked by the caller prior to callingbeforeCompletion()orafterCompletion(boolean, boolean)- Returns:
trueindicates the target is active;falseindicates it is not.
-
beforeCompletion
void beforeCompletion()
Callback of before-completion.- See Also:
Synchronization.beforeCompletion()
-
afterCompletion
void afterCompletion(boolean successful, boolean delayed)Callback of after-completion.- Parameters:
successful- Was the transaction successful?- See Also:
Synchronization.afterCompletion(int)
-
-