Pre-integrated Tomcat with ActiveMQ

Apache TomEE is a distribution of Tomcat with fully integrated ActiveMQ. All integration steps detailed here have already been done. The stack supports injection of Topic, Queue and ConnectionFactory references as well as transactional sending and delivery.

Something like the following works out of the box with no configuration:

Manually integrating Tomcat and ActiveMQ

Note, manually integrating ActiveMQ with Tomcat does allow for Topic, Queue, and ConnectionFactory injection but does not support transactional sending and delivery.

You should go to Tomcat documentation and read JNDI Resources HOW-TO, especially part: Configure Tomcat's Resource Factory.

ActiveMQ has ready JNDI resource factory for all its administered objects: ConnectionFactory and destinations.

You must provide it as a parameter factory for your resources:

 

If you are using Tomcat 5.5 or later then try this instead...

 

Also, don't forget to put ActiveMQ and dependent jars to tomcat shared lib directory.

Creating destinations in Tomcat 5.5 or later

This is completely untested but should work (smile)

 

JMX Tip when working with Tomcat

Icon

If you want to use JMX with Tomcat and then connect via JConsole to view the JMX MBeans of the server then set the following

© 2004-2011 The Apache Software Foundation.
Apache ActiveMQ, ActiveMQ, Apache, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram