Module org.eclipse.persistence.core
Class JTASynchronizationListener
java.lang.Object
org.eclipse.persistence.transaction.AbstractSynchronizationListener
org.eclipse.persistence.transaction.JTASynchronizationListener
- All Implemented Interfaces:
Synchronization
,SynchronizationListenerFactory
public class JTASynchronizationListener
extends AbstractSynchronizationListener
implements SynchronizationListenerFactory
Purpose: Synchronization object implementation for JTA 1.0
Description: Instances of this class are registered against JTA 1.0 transactions. This class may be subclassed to provide specialized behavior for specific transaction implementations. Subclasses must implement the newListener() method to return an instances of the listener subclass.
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.transaction.AbstractSynchronizationListener
controller, sequencingCallback, sequencingCallbackMap, session, transaction, transactionKey, unitOfWork
-
Constructor Summary
ConstructorDescriptionPUBLIC: Used to create factory instances only.JTASynchronizationListener
(UnitOfWorkImpl unitOfWork, AbstractSession session, Object transaction, AbstractTransactionController controller) INTERNAL: Constructor for creating listener instances (expects all required state info) -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterCompletion
(int stat) INTERNAL: Called by the JTA transaction manager after the transaction is committed or rolled back.void
INTERNAL: Called by the JTA transaction manager prior to the start of the transaction completion process.newSynchronizationListener
(UnitOfWorkImpl unitOfWork, AbstractSession session, Object transaction, AbstractTransactionController controller) INTERNAL: Create and return the Synchronization listener object that can be registered to receive JTA transaction notification callbacks.Methods inherited from class org.eclipse.persistence.transaction.AbstractSynchronizationListener
afterCompletion, callSequencingCallback, getSequencingCallback, getSession, getTransaction, getTransactionController, getTransactionKey, getUnitOfWork, handleException, setSession, setTransaction, setTransactionController, setTransactionKey, setUnitOfWork
-
Constructor Details
-
JTASynchronizationListener
public JTASynchronizationListener()PUBLIC: Used to create factory instances only. Use the "full-bodied" constructor for creating proper listener instances. -
JTASynchronizationListener
public JTASynchronizationListener(UnitOfWorkImpl unitOfWork, AbstractSession session, Object transaction, AbstractTransactionController controller) INTERNAL: Constructor for creating listener instances (expects all required state info)
-
-
Method Details
-
newSynchronizationListener
public AbstractSynchronizationListener newSynchronizationListener(UnitOfWorkImpl unitOfWork, AbstractSession session, Object transaction, AbstractTransactionController controller) INTERNAL: Create and return the Synchronization listener object that can be registered to receive JTA transaction notification callbacks.- Specified by:
newSynchronizationListener
in interfaceSynchronizationListenerFactory
-
beforeCompletion
public void beforeCompletion()INTERNAL: Called by the JTA transaction manager prior to the start of the transaction completion process. This call is executed in the same transaction context of the caller who initiates the TransactionManager.commit, or the call is executed with no transaction context if Transaction.commit is used.- Specified by:
beforeCompletion
in interfaceSynchronization
- Overrides:
beforeCompletion
in classAbstractSynchronizationListener
-
afterCompletion
public void afterCompletion(int stat) INTERNAL: Called by the JTA transaction manager after the transaction is committed or rolled back. This method executes without a transaction context.- Specified by:
afterCompletion
in interfaceSynchronization
- Parameters:
stat
- The status of the transaction completion.
-