Top Description Methods
org.eclipse.persistence.sessions

public Interface ExternalTransactionController

Known Direct Implementers
org.eclipse.persistence.transaction.AbstractTransactionController
Imports
org.eclipse.persistence.internal.sequencing.SequencingCallback, .SequencingCallbackFactory, org.eclipse.persistence.internal.sessions.AbstractSession, .UnitOfWorkImpl, org.eclipse.persistence.exceptions.*

Purpose: Interface for external transaction management.

Description: This interface represents a delegate to be used for external transaction management. The implementing class may interface to an OMG OTS service, a Java JTA service or a manufacturer's specific implementation of these services.

Responsibilities:

Method Summary

Modifier and TypeMethod and Description
public void
beginTransaction(AbstractSession session)

INTERNAL: Begin a transaction externally.

public void
clearSequencingListeners()

INTERNAL: Clears sequencing listeners.

public void
commitTransaction(AbstractSession session)

INTERNAL: Commit a transaction externally.

public SequencingCallback
getActiveSequencingCallback(DatabaseSession dbSession, SequencingCallbackFactory sequencingCallbackFactory)

INTERNAL: Returns sequencingCallback for the current active external transaction.

public UnitOfWorkImpl
getActiveUnitOfWork()

INTERNAL: Return the active unit of work for the current active external transaction.

public ExceptionHandler
getExceptionHandler()

Return the exception handler used to handle or wrap exceptions thrown in before/after completion.

public AbstractSession
getSession()

INTERNAL: Return the manager's session.

public void
initializeSequencingListeners()

INTERNAL: Initializes sequencing listeners.

public void
markTransactionForRollback()

INTERNAL: Marks the external transaction for rollback only.

public void
registerSynchronizationListener(UnitOfWorkImpl uow, AbstractSession session)

INTERNAL: Register a listener on the unit of work.

public void
rollbackTransaction(AbstractSession session)

INTERNAL: Rollback a transaction externally.

public void
setExceptionHandler(ExceptionHandler exceptionHandler)

Set an exception handler to handle or wrap exceptions thrown in before/after completion.

public void
setSession(AbstractSession session)

INTERNAL: Set the manager's session.

Method Detail

beginTransactionback to summary
public void beginTransaction(AbstractSession session)

INTERNAL: Begin a transaction externally. This allows for EclipseLink to force a JTS transaction.

clearSequencingListenersback to summary
public void clearSequencingListeners()

INTERNAL: Clears sequencing listeners. Called by initializeSequencingListeners and by sequencing on disconnect.

commitTransactionback to summary
public void commitTransaction(AbstractSession session)

INTERNAL: Commit a transaction externally. This allows for EclipseLink to force a JTS transaction.

getActiveSequencingCallbackback to summary
public SequencingCallback getActiveSequencingCallback(DatabaseSession dbSession, SequencingCallbackFactory sequencingCallbackFactory)

INTERNAL: Returns sequencingCallback for the current active external transaction. DatabaseSession is passed for the sake of SessionBroker case. This method requires active external transaction.

getActiveUnitOfWorkback to summary
public UnitOfWorkImpl getActiveUnitOfWork()

INTERNAL: Return the active unit of work for the current active external transaction.

getExceptionHandlerback to summary
public ExceptionHandler getExceptionHandler()

Return the exception handler used to handle or wrap exceptions thrown in before/after completion.

getSessionback to summary
public AbstractSession getSession()

INTERNAL: Return the manager's session.

initializeSequencingListenersback to summary
public void initializeSequencingListeners()

INTERNAL: Initializes sequencing listeners. Always clears sequencing listeners first. There are two methods calling this method: 1. setSession method - this could lead to initialization of sequencing listeners only if sequencing already connected (that would happen if setSession is called after session.login, which is normally not the case). 2. in the very end of connecting sequencing, after it's determined whether sequencing callbacks (and therefore listeners) will be required.

markTransactionForRollbackback to summary
public void markTransactionForRollback()

INTERNAL: Marks the external transaction for rollback only.

registerSynchronizationListenerback to summary
public void registerSynchronizationListener(UnitOfWorkImpl uow, AbstractSession session) throws DatabaseException

INTERNAL: Register a listener on the unit of work. The listener will callback to the unit of work to tell it to commit and merge.

rollbackTransactionback to summary
public void rollbackTransaction(AbstractSession session)

INTERNAL: Rollback a transaction externally. This allows for EclipseLink to force a JTS transaction.

setExceptionHandlerback to summary
public void setExceptionHandler(ExceptionHandler exceptionHandler)

Set an exception handler to handle or wrap exceptions thrown in before/after completion.

setSessionback to summary
public void setSession(AbstractSession session)

INTERNAL: Set the manager's session.