public class JMSRemoteCommitProvider extends AbstractRemoteCommitProvider implements Configurable, GenericConfigurable, javax.jms.ExceptionListener
RemoteCommitProvider that
listens for object modifications and propagates those changes to
other RemoteCommitProviders over a JMS topic.eventManager, log| Constructor and Description |
|---|
JMSRemoteCommitProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
broadcast(RemoteCommitEvent event)
Notifies other remote event managers in this JVM and on other machines
of changes to the cache.
|
void |
close()
Free the resources used by this provider.
|
protected void |
connect() |
protected javax.jms.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 javax.jms.MessageListener |
getMessageListener() |
protected Context |
newContext()
Returns a new
Context object for use by this provider. |
void |
onException(javax.jms.JMSException ex) |
void |
setExceptionReconnectAttempts(int attempts)
The number of times to attempt to reconnect after a JMS send exception
is detected.
|
void |
setInto(Options opts)
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.
|
fireEvent, setConfiguration, setRemoteCommitEventManager, startConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetConfiguration, startConfigurationpublic void setTopic(String name)
topic/OpenJPACommitProviderTopic.public void setTopicConnectionFactory(String name)
java:/ConnectionFactory.public void setExceptionReconnectAttempts(int attempts)
public void setInto(Options opts)
InitialContext
constructor for JNDI lookups. Implementation of
GenericConfigurable.setInto in interface GenericConfigurableprotected Context newContext() throws NamingException
Context object for use by this provider.NamingExceptionpublic void broadcast(RemoteCommitEvent event)
RemoteCommitProviderbroadcast in interface RemoteCommitProviderpublic void close()
RemoteCommitProviderclose in interface RemoteCommitProviderclose in interface Closeablepublic void endConfiguration()
Configurable.endConfiguration() must invoke this method.endConfiguration in interface ConfigurableendConfiguration in class AbstractRemoteCommitProviderprotected void connect()
protected javax.jms.MessageListener getMessageListener()
protected javax.jms.Message createMessage(RemoteCommitEvent event) throws javax.jms.JMSException
Message to send to the topic. This
implementation creates an ObjectMessage.javax.jms.JMSExceptionpublic void onException(javax.jms.JMSException ex)
onException in interface javax.jms.ExceptionListenerCopyright © 2006–2022 Apache Software Foundation. All rights reserved.