SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

com.solarmetric.kodo.runtime.event.impl
Class JMSRemoteCommitProvider

java.lang.Object
  |
  +--com.solarmetric.kodo.runtime.event.impl.RemoteCommitProviderImpl
        |
        +--com.solarmetric.kodo.runtime.event.impl.JMSRemoteCommitProvider
All Implemented Interfaces:
Configurable, RemoteCommitProvider

public class JMSRemoteCommitProvider
extends RemoteCommitProviderImpl
implements Configurable

JMS-based implementation of RemoteCommitProvider that listens for object modifications and propagates those changes to other RemoteCommitProviders over a JMS topic.

Since:
2.5.0

Fields inherited from class com.solarmetric.kodo.runtime.event.impl.RemoteCommitProviderImpl
_factory, _log
 
Constructor Summary
JMSRemoteCommitProvider()
           
 
Method Summary
 void broadcastCommitInfo(Set adds, Set updates, Set deletes)
          Notifies other PersistenceManagerFactory objects in this JVM and on other machines of changes to the cache.
 void close()
          Close any resources used by this provider
protected  javax.jms.Message createMessage(Set adds, Set updates, Set deletes)
          Returns a new Message to send to the topic.
 void endConfiguration()
          Subclasses that need to perform actions in Configurable.endConfiguration() must invoke this method.
protected  javax.jms.MessageListener getMessageListener()
          Returns a MessageListener capable of understanding and processing messages created by createMessage(java.util.Set, java.util.Set, java.util.Set).
 void setTopic(String name)
          Sets the JMS Topic name.
 void setTopicConnectionFactory(String name)
          Sets the JMS TopicConnectionFactory name.
 void startConfiguration()
          No-op implementation.
 
Methods inherited from class com.solarmetric.kodo.runtime.event.impl.RemoteCommitProviderImpl
receivedCommitInfo, setPersistenceManagerFactory
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSRemoteCommitProvider

public JMSRemoteCommitProvider()
Method Detail

setTopic

public void setTopic(String name)
Sets the JMS Topic name. Defaults to topic/KodoCommitProviderTopic.

setTopicConnectionFactory

public void setTopicConnectionFactory(String name)
Sets the JMS TopicConnectionFactory name. Defaults to java:/ConnectionFactory.

broadcastCommitInfo

public void broadcastCommitInfo(Set adds,
                                Set updates,
                                Set deletes)
Description copied from interface: RemoteCommitProvider

Notifies other PersistenceManagerFactory objects in this JVM and on other machines of changes to the cache. This method must not notify the PersistenceManagerFactory associated with the PersistenceManager that originated this commit.

adds, updates, and deletes are sets of object IDs that were added, updated, or deleted.


close

public void close()
Description copied from interface: RemoteCommitProvider
Close any resources used by this provider

startConfiguration

public void startConfiguration()
No-op implementation. Subclasses should invoke this method in case future implementations need to use it.
Specified by:
startConfiguration in interface Configurable

endConfiguration

public void endConfiguration()
Subclasses that need to perform actions in Configurable.endConfiguration() must invoke this method.
Specified by:
endConfiguration in interface Configurable

getMessageListener

protected javax.jms.MessageListener getMessageListener()

Returns a MessageListener capable of understanding and processing messages created by createMessage(java.util.Set, java.util.Set, java.util.Set).

The listener returned by this method is responsible for notifying the provider that a remote event has been received. It should invoke RemoteCommitProvider#receivedCommitInfo.

This implementation transfers data via NotificationObject objects, and invokes NotificationObject.receivedCommitInfo(com.solarmetric.kodo.runtime.event.impl.RemoteCommitProviderImpl) on the received object, which in turn invokes RemoteCommitProviderImpl.receivedCommitInfo(java.util.Set, java.util.Set, java.util.Set).


createMessage

protected javax.jms.Message createMessage(Set adds,
                                          Set updates,
                                          Set deletes)
                                   throws javax.jms.JMSException
Returns a new Message to send to the topic. This implementation creates an ObjectMessage.

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

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