|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TransactionListener
A listener to be notified before and after the completion of a transaction.
Callers can register TransactionListeners to learn about the
completion of a transaction without joining the transaction as a TransactionParticipant. Because Services may depend on operations
performed by the TransactionListener.beforeCompletion methods of listeners that they
register, beforeCompletion methods should not make calls to other
services, even though the transaction is still considered active when beforeCompletion is called. The results of such calls are unspecified.
Transaction.registerListener| Method Summary | |
|---|---|
void |
afterCompletion(boolean committed)
Called after a transaction is committed or aborted. |
void |
beforeCompletion()
Called after the main work of the transaction is complete, just before the transaction is prepared. |
String |
getTypeName()
Returns the fully qualified type name of the listener. |
| Method Detail |
|---|
void beforeCompletion()
Services. If the transaction has multiple
transaction listeners registered, the order in which the listeners are
called is unspecified.If this method throws an exception, then the transaction will be aborted, and the exception will be treated as if it were thrown by the main body of the transaction.
This method will not be called if the transaction is aborted before it reaches the preparation stage, including if an earlier call to this method on another listener throws an exception or aborts the transaction.
RuntimeException - if the transaction should be abortedvoid afterCompletion(boolean committed)
true if the transaction committed, else false
if it aborted. If the transaction has multiple transaction listeners
registered, the order in which the listeners are called is unspecified.
committed - true if the transaction committed, else
false if it abortedString getTypeName()
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||