|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
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.JDOFatalException
s 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_BEGIN
public void beforeFlush(TransactionEvent event)
TransactionEvent.BEFORE_FLUSH
public void afterFlush(TransactionEvent event)
TransactionEvent.AFTER_FLUSH
public void beforeCommit(TransactionEvent event)
TransactionEvent.BEFORE_COMMIT
public void afterCommit(TransactionEvent event)
TransactionEvent.AFTER_COMMIT
public void afterRollback(TransactionEvent event)
TransactionEvent.AFTER_ROLLBACK
public void afterStateTransitions(TransactionEvent event)
TransactionEvent.AFTER_STATE_TRANSITIONS
|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |