FileDocCategorySizeDatePackage
JTASynchronizationListener.javaAPI DocGlassfish v2 API4559Tue May 22 16:54:54 BST 2007oracle.toplink.essentials.transaction

JTASynchronizationListener

public class JTASynchronizationListener extends AbstractSynchronizationListener implements Synchronization, 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
JTATransactionController

Fields Summary
Constructors Summary
public JTASynchronizationListener()
PUBLIC: Used to create factory instances only. Use the "full-bodied" constructor for creating proper listener instances.

        super();
    
public JTASynchronizationListener(UnitOfWorkImpl unitOfWork, AbstractSession session, Object transaction, AbstractTransactionController controller)
INTERNAL: Constructor for creating listener instances (expects all required state info)

        super(unitOfWork, session, transaction, controller);
    
Methods Summary
public voidafterCompletion(int stat)
INTERNAL: Called by the JTA transaction manager after the transaction is committed or rolled back. This method executes without a transaction context.

param
stat The status of the transaction completion.

        super.afterCompletion(new Integer(stat));
    
public voidbeforeCompletion()
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.

        super.beforeCompletion();
    
public oracle.toplink.essentials.transaction.AbstractSynchronizationListenernewSynchronizationListener(oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl unitOfWork, oracle.toplink.essentials.internal.sessions.AbstractSession session, java.lang.Object transaction, oracle.toplink.essentials.transaction.AbstractTransactionController controller)
INTERNAL: Create and return the Synchronization listener object that can be registered to receive JTA transaction notification callbacks.

        return new JTASynchronizationListener(unitOfWork, session, transaction, controller);