Synchronizing caches using Java Message Service
To synchronize caches using JMS, get a JMS provider up and running, configure a Connector for JMS, specifying the implementing Java class, and specify a Topic, Topic Connection Factory, and Strategy.
Procedure
- Set up a JMS provider, such as Apache ActiveMQ, on a machine of your choosing.
- In all SDL Tridion Web applications, Java processes and Windows services where caching is enabled, open the Storage Layer configuration file cd_storage_conf.xml in a plain-text or XML editor.
- Inside the
ObjectCache, insert aRemoteSynchronizationelement as the last subelement, and create aConnectorsubelement inside it. - Give the
Connectorsubelement the following attributes:Class- Set this attribute to the value com.tridion.cache.JMSCacheChannelConnector.
Topic- Set this attribute to the JMS topic to which the Connector is to publish its cache events.
TopicConnectionFactory- Set this attribute to the Factory that creates topic connections to the JMS provider.
Strategy-
Set this attribute to the JMS strategy used, which is one of the following values:
Strategy name Description AsyncJMS10JMS 1.0-compliant asynchronous messaging AsyncJMS11JMS 1.1-compliant asynchronous messaging. The attribute defaults to this value if left empty. AsyncJMS10MDBJMS 1.0-compliant Message Drive Bean messaging AsyncJMS11MDBJMS 1.1-compliant Message Drive Bean messaging SyncJMS11JMS 1.1-compliant synchronous messaging
- Use the
JndiContextsubelement of theConnectorelement to set a number of named properties in the form ofPropertyelements.The properties typically specify (among others) where to locate the JMS provider, and their names and values depend on the JMS provider used. For example, when using ActiveMQ, you would set the following properties:
<JndiContext> <Property Name="java.naming.factory.initial" Value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" /> <Property Name="java.naming.provider.url" Value="tcp://providerdb.domain.name:61616?soTimeout=5000" /> </JndiContext> - Save and close cd_storage_conf.xml.
- Restart the Web application, Java process or Windows service.
Related reference