Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can easily integrate the RealTime Messaging Module with Tomcat and ActiveMQ.
Next, we're going to explain the most important part of Below are the key steps in setting up this integration.

1. Setup RealTime Messaging Module.
You need to configure the server.properties configuration file of your application. The basic configuration of this file should be as followfollows:

Code Block
---server.properties----
messaging.dispatcherImplementer: com.isomorphic.messaging.JMSMessageDispatcher
jndi.messaging.java.naming.factory.initial: org.apache.activemq.jndi.ActiveMQInitialContextFactory
jndi.messaging.java.naming.provider.url: tcp://hostname:61616
messaging.jms.context: _container_
messaging.jms.jndiPrefix:
messaging.jms.topicConnectionFactory: jms/ConnectionFactory

...

2. Configure Tomcat with ActiveMQ.
Next, you need to configure Configure the context.xml configuration file of your Tomcat server. This file is located in the path at <HOME_TOMCAT>/conf/. Use this configuration If if you are using Tomcat 5.5 or later.

...

3. Setup ActiveMQ.
For an independent installation you can refer here, please refer to the getting started guide.
If you prefer to run ActiveMQ inside of Tomcat, use the previous configuration and consider these settings:

...

However, when using the embedded option, you only need to add  the following jars to the Tomcat's lib folder the following jars:
activemq-all-5.5.1.jar
slf4j-log4j12-1.5.11.jar
log4j-1.2.14.jar
slf4j-api-1.5.11.jar

4. Setup your application.
You only need to add Add the activemq-all-5.5.1.jar library to your application.

...