org.apache.openjpa.event
Interface RemoteCommitListener

All Superinterfaces:
Closeable
All Known Implementing Classes:
ConcurrentDataCache, ConcurrentQueryCache

public interface RemoteCommitListener
extends Closeable

An entity that wishes to be notified when Brokers associated with remote BrokerFactories commit. A RemoteCommitListener is not notified of commits that originated with a Broker created from the BrokerFactory that it is registered with. (Of course, if a listener is registered with multiple factories, this situation might be complicated a bit.) Usage:

 import org.apache.openjpa.event.*;
 import org.apache.openjpa.conf.*;
 
 OpenJPAConfiguration conf = factory.getConfiguraiton ();
  RemoteCommitListener l = new RemoteCommitListener () {
 public void afterCommit (RemoteCommitEvent e) {
 // update a Swing widget when remote brokers make
 // changes to reference data }
  public void close () { } };
  conf.getRemoteCommitEventManager ().addListener (l);
 

Since:
0.2.5.0
Author:
Patrick Linskey

Method Summary
 void afterCommit(RemoteCommitEvent event)
          Notification that a transaction associated with a different BrokerFactory has successfully committed.
 void close()
          Free the resources used by this listener.
 

Method Detail

afterCommit

void afterCommit(RemoteCommitEvent event)
Notification that a transaction associated with a different BrokerFactory has successfully committed.


close

void close()
Free the resources used by this listener.

Specified by:
close in interface Closeable


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.

This documentation is deprecated and will be removed in the next release of WebLogic Server.


Oracle Fusion Middleware Apache OpenJPA 1.1.0 API Reference
12c Release 1 (12.1.1)
Part Number E24398_01