public final class CoreToSessionPropagator extends java.lang.Object implements TransactionListener
Constructor and Description |
---|
CoreToSessionPropagator(ConfigServiceImpl configService) |
Modifier and Type | Method and Description |
---|---|
void |
afterBegin(Transaction tr)
Invoked right after the transaction begins.
|
void |
afterEnd(Transaction tr)
Invoked after the transaction ends, namely, after the transaction fully commits or fully rolled back.
|
void |
beforeEnd(Transaction tr)
Invoked right before the transaction commits or rollsback.
|
void |
beforePrepare(Transaction tr)
This method handles all the validation and propagation of values into sessions
|
java.lang.String |
getId()
Unique name for this transactional listener
|
boolean |
rollbackOnFailure()
Indicates whether exceptions from
TransactionListener.beforePrepare(com.bea.wli.config.transaction.Transaction) methods cause the transaction to rollback. |
public CoreToSessionPropagator(ConfigServiceImpl configService)
public java.lang.String getId()
TransactionListener
getId
in interface TransactionListener
public boolean rollbackOnFailure()
TransactionListener
TransactionListener.beforePrepare(com.bea.wli.config.transaction.Transaction)
methods cause the transaction to rollback.rollbackOnFailure
in interface TransactionListener
TransactionListener.beforePrepare(com.bea.wli.config.transaction.Transaction)
method raises exceptions; false otherwisepublic void afterBegin(Transaction tr)
TransactionListener
is called
.
Exception behavior: While the implementations are not supposed to throw exceptions, any unchecked exception will cause the transaction to be abandoned and the caller of the beginTransaction method will get a TransactionException
This method is invoked under the TransactionManager lock.
afterBegin
in interface TransactionListener
public void beforeEnd(Transaction tr)
TransactionListener
Transaction.Status.Rollingback
or Transaction.Status.Committing
.
Exception behavior: While the implementations are not supposed to throw exceptions, any unchecked exception will be completely ignored. The remainder of the notifications are delivered normally.
This method is invoked under the TransactionManager lock.
beforeEnd
in interface TransactionListener
public void afterEnd(Transaction tr)
TransactionListener
Transaction.Status.Rolledback
or Transaction.Status.Committed
.
This method is invoked under the TransactionManager lock.
afterEnd
in interface TransactionListener
public void beforePrepare(Transaction tr) throws java.lang.Exception
beforePrepare
in interface TransactionListener
tr
- the transaction being preparedjava.lang.Exception
- if an error occurs in the callback