|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.cache.invalidation.bridges.JMSCacheInvalidationBridge
JMS implementation of a cache invalidation bridge Based on previous code of Bill Burke based on interceptors
Revisions:
28 septembre 2002 Sacha Labourey:
InvalidationManagerMBean
Field Summary | |
protected int |
acknowledgeMode
|
protected javax.jms.TopicConnection |
conn
|
protected String |
connectionFactoryName
|
protected String |
invalidationManagerName
|
protected BridgeInvalidationSubscription |
invalidationSubscription
|
protected InvalidationManagerMBean |
invalMgr
|
static String |
JMS_CACHE_INVALIDATION_BRIDGE
|
protected int |
propagationMode
|
protected String |
providerUrl
|
protected javax.jms.TopicPublisher |
pub
|
protected boolean |
publishingAuthorized
|
protected VMID |
serviceId
|
protected javax.jms.TopicSession |
session
|
protected javax.jms.TopicSubscriber |
subscriber
|
protected javax.jms.Topic |
topic
|
protected String |
topicName
|
protected boolean |
transacted
|
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.cache.invalidation.bridges.JMSCacheInvalidationBridgeMBean |
AUTO_ACKNOWLEDGE_MODE, CLIENT_ACKNOWLEDGE_MODE, DUPS_OK_ACKNOWLEDGE_MODE, IN_ONLY_BRIDGE_PROPAGATION, IN_OUT_BRIDGE_PROPAGATION, OUT_ONLY_BRIDGE_PROPAGATION |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
JMSCacheInvalidationBridge()
|
Method Summary | |
void |
batchInvalidate(BatchInvalidation[] invalidations,
boolean asynchronous)
Called when a set of invalidations, concerning more than one IG, should be forwarded accross the bridge. |
int |
getAcknowledgeMode()
Status of the JMS topic wrt messages acknowledgement |
String |
getConnectionFactoryName()
JNDI name of the JMS connection factory to use for cache invalidations |
protected InitialContext |
getInitialContext()
|
String |
getInvalidationManager()
ObjectName of the InvalidationManager to be used. |
int |
getPropagationMode()
Indicates if this bridge should: 1 - Post local invalidations to the topic and invalidate local caches with invalidations received on the topic 2 - Only invalidate local caches with invalidations received on the topic but not post anything on the topic 3 - Only post local invalidations to the topic and not listen to the Topic for invalidation messages |
String |
getProviderUrl()
Provider URL to use for JMS access. |
protected javax.jms.TopicPublisher |
getPublisher()
|
protected javax.jms.TopicSession |
getSession()
|
String |
getTopicName()
JNDI name of the Topic to use to send/receive cache invalidations. |
void |
groupIsDropped(String groupInvalidationName)
Called when an InvocationGroup is dropped (because no cache and invalider are using it anymore). |
void |
invalidate(String invalidationGroupName,
Serializable[] keys,
boolean asynchronous)
Called when a set of invalidations, concerning a single IG, should be forwarded accross the bridge. |
void |
invalidate(String invalidationGroupName,
Serializable key,
boolean asynchronous)
Called when a single invalidation, concerning a single IG, should be forwarded accross the bridge. |
void |
invalidateAll(String groupName,
boolean asynchronous)
Issues invalidate all event to other nodes. |
boolean |
isTransacted()
Status of the JMS topic wrt transactions |
void |
newGroupCreated(String groupInvalidationName)
Called when an InvocationGroup is created. |
void |
onMessage(javax.jms.Message msg)
|
protected void |
sendJMSInvalidationEvent(JMSCacheInvalidationMessage invalidationMsg)
|
void |
setAcknowledgeMode(int ackMode)
|
void |
setConnectionFactoryName(String factoryName)
|
void |
setInvalidationManager(String objectName)
|
void |
setPropagationMode(int propMode)
|
void |
setProviderUrl(String providerUrl)
|
void |
setTopicName(String topicName)
|
void |
setTransacted(boolean isTransacted)
|
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Field Detail |
public static final String JMS_CACHE_INVALIDATION_BRIDGE
protected InvalidationManagerMBean invalMgr
protected BridgeInvalidationSubscription invalidationSubscription
protected String invalidationManagerName
protected boolean publishingAuthorized
protected String connectionFactoryName
protected String topicName
protected boolean transacted
protected int acknowledgeMode
protected int propagationMode
protected VMID serviceId
protected javax.jms.TopicConnection conn
protected javax.jms.TopicSession session
protected javax.jms.Topic topic
protected javax.jms.TopicSubscriber subscriber
protected javax.jms.TopicPublisher pub
protected String providerUrl
Constructor Detail |
public JMSCacheInvalidationBridge()
Method Detail |
public String getInvalidationManager()
JMSCacheInvalidationBridgeMBean
getInvalidationManager
in interface JMSCacheInvalidationBridgeMBean
public void setInvalidationManager(String objectName)
setInvalidationManager
in interface JMSCacheInvalidationBridgeMBean
public String getConnectionFactoryName()
JMSCacheInvalidationBridgeMBean
getConnectionFactoryName
in interface JMSCacheInvalidationBridgeMBean
public void setConnectionFactoryName(String factoryName)
setConnectionFactoryName
in interface JMSCacheInvalidationBridgeMBean
public String getTopicName()
JMSCacheInvalidationBridgeMBean
getTopicName
in interface JMSCacheInvalidationBridgeMBean
public void setTopicName(String topicName)
setTopicName
in interface JMSCacheInvalidationBridgeMBean
public String getProviderUrl()
JMSCacheInvalidationBridgeMBean
getProviderUrl
in interface JMSCacheInvalidationBridgeMBean
public void setProviderUrl(String providerUrl)
setProviderUrl
in interface JMSCacheInvalidationBridgeMBean
public boolean isTransacted()
JMSCacheInvalidationBridgeMBean
isTransacted
in interface JMSCacheInvalidationBridgeMBean
public void setTransacted(boolean isTransacted)
setTransacted
in interface JMSCacheInvalidationBridgeMBean
public int getAcknowledgeMode()
JMSCacheInvalidationBridgeMBean
getAcknowledgeMode
in interface JMSCacheInvalidationBridgeMBean
public void setAcknowledgeMode(int ackMode)
setAcknowledgeMode
in interface JMSCacheInvalidationBridgeMBean
public int getPropagationMode()
JMSCacheInvalidationBridgeMBean
getPropagationMode
in interface JMSCacheInvalidationBridgeMBean
public void setPropagationMode(int propMode)
setPropagationMode
in interface JMSCacheInvalidationBridgeMBean
public void onMessage(javax.jms.Message msg)
onMessage
in interface javax.jms.MessageListener
public void batchInvalidate(BatchInvalidation[] invalidations, boolean asynchronous)
InvalidationBridgeListener
batchInvalidate
in interface InvalidationBridgeListener
invalidations
- BatchInvalidation messages containing invalidationsasynchronous
- Determine the best-effort indication to be used to communicate invalidationspublic void invalidate(String invalidationGroupName, Serializable[] keys, boolean asynchronous)
InvalidationBridgeListener
invalidate
in interface InvalidationBridgeListener
invalidationGroupName
- Name of the InvalidationGroup to which is linked the invalidation messagekeys
- Keys to be invalidatedasynchronous
- Best effort communication settingpublic void invalidate(String invalidationGroupName, Serializable key, boolean asynchronous)
InvalidationBridgeListener
invalidate
in interface InvalidationBridgeListener
invalidationGroupName
- InvalidationGroup namekey
- Key to be invalidatedasynchronous
- Best effort communication settingpublic void invalidateAll(String groupName, boolean asynchronous)
InvalidationBridgeListener
invalidateAll
in interface InvalidationBridgeListener
groupName
- group's nameasynchronous
- modepublic void newGroupCreated(String groupInvalidationName)
InvalidationBridgeListener
newGroupCreated
in interface InvalidationBridgeListener
groupInvalidationName
- Name of the InvalidationGroup just being createdpublic void groupIsDropped(String groupInvalidationName)
InvalidationBridgeListener
groupIsDropped
in interface InvalidationBridgeListener
groupInvalidationName
- Name of the InvalidationGroup being droppedprotected void startService() throws Exception
Exception
protected void stopService()
protected javax.jms.TopicSession getSession()
protected javax.jms.TopicPublisher getPublisher()
protected void sendJMSInvalidationEvent(JMSCacheInvalidationMessage invalidationMsg)
protected InitialContext getInitialContext() throws NamingException
NamingException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |