Documentation Center

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.

Before you begin

Procedure

  1. Set up a JMS provider, such as Apache Active MQ, on a machine of your choosing.
  2. 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.
  3. Inside the ObjectCache, insert a RemoteSynchronization element as the last subelement, and create a Connector subelement inside it.
  4. 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 nameDescription
    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

    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.

  5. 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>
  6. Save and close cd_storage_conf.xml.
  7. Restart the Web application, Java process or Windows service.

SDL Tridion World Article: Using SDL Tridion Object Caching with Apache Active MQ

You can find out more about using caching with Apache Active MQ in the following SDL Tridion World article: https://www.sdltridionworld.com/articles/usingsdltridionobjectcachingwithapacheactivemq.aspx.