|
SolarMetric Kodo JDO 3.4.1 generated on May 30 2006 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
An entity that wishes to be notified on certain PersistenceManager transactional status changes.
TransactionListeners can be programmatically registered with a
PersistenceManager in code:
import kodo.event.*;
import kodo.runtime.*;
KodoPersistenceManager pm = (KodoPersistenceManager)
pmf.getPersistenceManager ();
TransactionListener l = new
AbstractTransactionListener () {
public void afterCommit (TransactionEvent e) {
// send out an email confirming that the
// transaction was a success
}
};
pm.registerListener (l);
Any exceptions except javax.jdo.JDOFatalExceptions thrown by
the methods in this interface are consumed.
| Method Summary | |
void |
afterBegin(TransactionEvent event)
Notification that a transaction has begun. |
void |
afterCommit(TransactionEvent event)
Notification that a transaction has successfully committed. |
void |
afterFlush(TransactionEvent event)
Notification that a transaction has flushed all object changes. |
void |
afterRollback(TransactionEvent event)
Notification that a transaction has been rolled back. |
void |
afterStateTransitions(TransactionEvent event)
Notification that JDO state transitions are complete. |
void |
beforeCommit(TransactionEvent event)
Notification that the next flush is for the transaction commit. |
void |
beforeFlush(TransactionEvent event)
Notification that a transaction is about to flush all object changes. |
| Method Detail |
public void afterBegin(TransactionEvent event)
TransactionEvent.AFTER_BEGINpublic void beforeFlush(TransactionEvent event)
TransactionEvent.BEFORE_FLUSHpublic void afterFlush(TransactionEvent event)
TransactionEvent.AFTER_FLUSHpublic void beforeCommit(TransactionEvent event)
TransactionEvent.BEFORE_COMMITpublic void afterCommit(TransactionEvent event)
TransactionEvent.AFTER_COMMITpublic void afterRollback(TransactionEvent event)
TransactionEvent.AFTER_ROLLBACKpublic void afterStateTransitions(TransactionEvent event)
TransactionEvent.AFTER_STATE_TRANSITIONS
|
SolarMetric Kodo JDO 3.4.1 generated on May 30 2006 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||