EclipseLink 1.2.0, build 'v20091016-r5565' API Reference

org.eclipse.persistence.transaction
Class JTASynchronizationListener

java.lang.Object
  extended by org.eclipse.persistence.transaction.AbstractSynchronizationListener
      extended by org.eclipse.persistence.transaction.JTASynchronizationListener
All Implemented Interfaces:
javax.transaction.Synchronization, SynchronizationListenerFactory

public class JTASynchronizationListener
extends AbstractSynchronizationListener
implements javax.transaction.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 Also:
JTATransactionController

Field Summary
 
Fields inherited from class org.eclipse.persistence.transaction.AbstractSynchronizationListener
controller, sequencingCallback, sequencingCallbackMap, session, transaction, transactionKey, unitOfWork
 
Constructor Summary
JTASynchronizationListener()
          PUBLIC: Used to create factory instances only.
JTASynchronizationListener(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.Object transaction, AbstractTransactionController controller)
          INTERNAL: Constructor for creating listener instances (expects all required state info)
 
Method Summary
 void afterCompletion(int stat)
          INTERNAL: Called by the JTA transaction manager after the transaction is committed or rolled back.
 void beforeCompletion()
          INTERNAL: Called by the JTA transaction manager prior to the start of the transaction completion process.
 AbstractSynchronizationListener newSynchronizationListener(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTASynchronizationListener

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


JTASynchronizationListener

public JTASynchronizationListener(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
                                  org.eclipse.persistence.internal.sessions.AbstractSession session,
                                  java.lang.Object transaction,
                                  AbstractTransactionController controller)
INTERNAL: Constructor for creating listener instances (expects all required state info)

Method Detail

newSynchronizationListener

public AbstractSynchronizationListener newSynchronizationListener(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
                                                                  org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                                  java.lang.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 interface SynchronizationListenerFactory

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 interface javax.transaction.Synchronization
Overrides:
beforeCompletion in class AbstractSynchronizationListener

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 interface javax.transaction.Synchronization
Parameters:
stat - The status of the transaction completion.

EclipseLink 1.2.0, build 'v20091016-r5565' API Reference