|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.event.AbstractRemoteCommitProvider org.apache.openjpa.event.JMSRemoteCommitProvider
public class JMSRemoteCommitProvider
JMS-based implementation of RemoteCommitProvider
that
listens for object modifications and propagates those changes to
other RemoteCommitProviders over a JMS topic.
Field Summary |
---|
Fields inherited from class org.apache.openjpa.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()
Free the 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()
|
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(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. |
Methods inherited from class org.apache.openjpa.event.AbstractRemoteCommitProvider |
---|
fireEvent, 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 org.apache.openjpa.lib.conf.Configurable |
---|
setConfiguration, startConfiguration |
Constructor Detail |
---|
public JMSRemoteCommitProvider()
Method Detail |
---|
public 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 GenericConfigurable
protected Context newContext() throws NamingException
Context
object for use by this provider.
NamingException
public void broadcast(RemoteCommitEvent event)
RemoteCommitProvider
broadcast
in interface RemoteCommitProvider
public void close()
RemoteCommitProvider
close
in interface RemoteCommitProvider
close
in interface Closeable
public void endConfiguration()
Configurable.endConfiguration()
must invoke this method.
endConfiguration
in interface Configurable
endConfiguration
in class AbstractRemoteCommitProvider
protected MessageListener getMessageListener()
protected Message createMessage(RemoteCommitEvent event) throws JMSException
Message
to send to the topic. This
implementation creates an ObjectMessage
.
JMSException
public void onException(JMSException ex)
onException
in interface ExceptionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |