public abstract class AbstractSynchronizationListener
extends java.lang.Object
Purpose: Abstract Synchronization Listener class Description: This abstract class is paired with the AbstractTransactionController class. It contains most of the implementation logic to handle callback notifications from an external transaction manager to ensure consistency between the global transaction and the TopLink unit of work. It does not assume any particular specification or interface, but can be called by any implementation subclass.
AbstractTransactionController
Modifier and Type | Field and Description |
---|---|
protected AbstractTransactionController |
controller
The external txn controller that is intimate with the transaction manager
and knows how to do things like rolling back transactions, etc.
|
protected AbstractSession |
session
The parent of the uow.
|
protected java.lang.Object |
transaction
The global transaction object.
|
protected UnitOfWorkImpl |
unitOfWork
The unit of work associated with the global txn that this listener is
bound to.
|
Modifier | Constructor and Description |
---|---|
|
AbstractSynchronizationListener()
INTERNAL:
|
protected |
AbstractSynchronizationListener(UnitOfWorkImpl unitOfWork,
AbstractSession session,
java.lang.Object transaction,
AbstractTransactionController controller)
INTERNAL:
|
Modifier and Type | Method and Description |
---|---|
void |
afterCompletion(java.lang.Object status)
INTERNAL:
The method performs the logic that should be executed after the transaction
has been completed.
|
void |
beforeCompletion()
INTERNAL:
This method performs the logic that occurs at transaction
completion time.
|
protected AbstractSession |
getSession() |
protected java.lang.Object |
getTransaction() |
protected AbstractTransactionController |
getTransactionController() |
protected UnitOfWorkImpl |
getUnitOfWork() |
void |
handleException(java.lang.RuntimeException exception)
INTERNAL:
Do the appropriate thing for when an exception occurs during SQL issuance.
|
protected void |
setSession(AbstractSession session) |
protected void |
setTransaction(java.lang.Object transaction) |
protected void |
setTransactionController(AbstractTransactionController newController) |
protected void |
setUnitOfWork(UnitOfWorkImpl unitOfWork) |
protected AbstractTransactionController controller
protected AbstractSession session
protected UnitOfWorkImpl unitOfWork
protected java.lang.Object transaction
public AbstractSynchronizationListener()
protected AbstractSynchronizationListener(UnitOfWorkImpl unitOfWork, AbstractSession session, java.lang.Object transaction, AbstractTransactionController controller)
public void beforeCompletion()
public void afterCompletion(java.lang.Object status)
status
- The status code of the transaction completion.public void handleException(java.lang.RuntimeException exception)
protected AbstractTransactionController getTransactionController()
protected void setTransactionController(AbstractTransactionController newController)
protected java.lang.Object getTransaction()
protected void setTransaction(java.lang.Object transaction)
protected AbstractSession getSession()
protected void setSession(AbstractSession session)
protected UnitOfWorkImpl getUnitOfWork()
protected void setUnitOfWork(UnitOfWorkImpl unitOfWork)