Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

## kodo.event
Interface TransactionListener

All Known Implementing Classes:
  AbstractTransactionListener, RemoteCommitEventManager

public interface TransactionListener

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.

Since:
  2.5.0

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

### afterBegin

    public void afterBegin(TransactionEvent event)

  Notification that a transaction has begun.
  See Also:
    `TransactionEvent.AFTER_BEGIN`

### beforeFlush

    public void beforeFlush(TransactionEvent event)

  Notification that a transaction is about to flush all object changes.
  See Also:
    `TransactionEvent.BEFORE_FLUSH`

### afterFlush

    public void afterFlush(TransactionEvent event)

  Notification that a transaction has flushed all object changes.
  See Also:
    `TransactionEvent.AFTER_FLUSH`

### beforeCommit

    public void beforeCommit(TransactionEvent event)

  Notification that the next flush is for the transaction commit.
  See Also:
    `TransactionEvent.BEFORE_COMMIT`

### afterCommit

    public void afterCommit(TransactionEvent event)

  Notification that a transaction has successfully committed.
  See Also:
    `TransactionEvent.AFTER_COMMIT`

### afterRollback

    public void afterRollback(TransactionEvent event)

  Notification that a transaction has been rolled back.
  See Also:
    `TransactionEvent.AFTER_ROLLBACK`

### afterStateTransitions

    public void afterStateTransitions(TransactionEvent event)

  Notification that JDO state transitions are complete.
  See Also:
    `TransactionEvent.AFTER_STATE_TRANSITIONS`

Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.