The listener side must add a handler to process the post-commit event it
receives over tcp.

The way to do this is as follows:
========================================================================
  OpenJPAEntityManagerFactory emf = ...;
  RemoteCommitListener listener = new RemoteCommitListener(){
        public void afterCommit(RemoteCommitEvent event) {
           // do whatever processing is required or just print to test
           System.err.println("RemoteCommitListener.afterCommit()" + event);
        }
        public void close() {
          System.err.println("Closing RemoteCommitListener");
        }
   };
   // add the listener 
 
emf.getConfiguration().getRemoteCommitEventManager().addListener(listener);
========================================================================

-- 
View this message in context: 
http://n2.nabble.com/regarding-configuration-of-the-distributed-cache-tp660903p667440.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to