SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

kodo.event
Class JMSRemoteCommitProvider

java.lang.Object
  |
  +--kodo.event.AbstractRemoteCommitProvider
        |
        +--kodo.event.JMSRemoteCommitProvider
All Implemented Interfaces:
com.solarmetric.util.Closeable, Configurable, ExceptionListener, GenericConfigurable, RemoteCommitProvider

public class JMSRemoteCommitProvider
extends AbstractRemoteCommitProvider
implements Configurable, GenericConfigurable, ExceptionListener

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 kodo.event.AbstractRemoteCommitProvider
eventManager, log
 
Constructor Summary
JMSRemoteCommitProvider()
           
 
Method Summary
 void broadcast(RemoteCommitEvent event)
          Notifies other remote event managers in this JVM and on other machines of changes to the cache.
 void close()
          Close any resources used by this provider
protected  Message createMessage(RemoteCommitEvent event)
          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  MessageListener getMessageListener()
          Returns a MessageListener capable of understanding and processing messages created by createMessage(kodo.event.RemoteCommitEvent).
protected  Context newContext()
          Returns a new Context object for use by this provider.
 void onException(JMSException ex)
           
 void setExceptionReconnectAttempts(int attempts)
          The number of times to attempt to reconnect after a JMS send exception is detected.
 void setInto(Map m)
          Set a map of properties to pass to the InitialContext constructor for JNDI lookups.
 void setTopic(String name)
          Sets the JMS Topic name.
 void setTopicConnectionFactory(String name)
          Sets the JMS TopicConnectionFactory name.
 
Methods inherited from class kodo.event.AbstractRemoteCommitProvider
setConfiguration, setRemoteCommitEventManager, startConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.solarmetric.conf.Configurable
setConfiguration, startConfiguration
 

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.

setExceptionReconnectAttempts

public void setExceptionReconnectAttempts(int attempts)
The number of times to attempt to reconnect after a JMS send exception is detected. Defaults to 0, meaning no attempt to reconnect is made; the exception is logged and ignored.

setInto

public void setInto(Map m)
Set a map of properties to pass to the InitialContext constructor for JNDI lookups. Implementation of GenericConfigurable.
Specified by:
setInto in interface GenericConfigurable

newContext

protected Context newContext()
                      throws NamingException
Returns a new Context object for use by this provider.

broadcast

public void broadcast(RemoteCommitEvent event)
Description copied from interface: RemoteCommitProvider
Notifies other remote event managers in this JVM and on other machines of changes to the cache. This method must not notify the event manager associated with the persistence manager that originated this commit.

close

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

endConfiguration

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

getMessageListener

protected MessageListener getMessageListener()

Returns a MessageListener capable of understanding and processing messages created by createMessage(kodo.event.RemoteCommitEvent).

The listener returned by this method is responsible for notifying the provider that a remote event has been received.


createMessage

protected Message createMessage(RemoteCommitEvent event)
                         throws JMSException
Returns a new Message to send to the topic. This implementation creates an ObjectMessage.

onException

public void onException(JMSException ex)
Specified by:
onException in interface ExceptionListener

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

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