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.
Before you begin
Note: Cache Channel Service using JMS does not support durable messages. That is, if the client goes offline and resumes at a later time, the Cache Channel Service does not receive any missed cache invalidation messages.
Procedure
- Set up a JMS provider, such as Apache Active MQ, 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 a RemoteSynchronization element as the last subelement, and create a Connector subelement inside it.
- Give the
Connector subelement 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 |
|---|
AsyncJMS10 | JMS 1.0-compliant asynchronous messaging |
AsyncJMS11 | JMS 1.1-compliant asynchronous messaging. The attribute defaults to this value if left empty. |
AsyncJMS10MDB | JMS 1.0-compliant Message Drive Bean messaging |
AsyncJMS11MDB | JMS 1.1-compliant Message Drive Bean messaging |
SyncJMS11 | JMS 1.1-compliant synchronous messaging |
Note that the Message Driven Bean JMS strategies can only send messages, not receive them. As such, they are not to be used on the Presentation Server (where you should use the asynchronous equivalent instead), but can be used in your Content Deployer Server Role.
- Use the
JndiContext subelement of the Connector element to set a number of named properties in the form of Property elements.
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.