Create the file <webapp-root>/META-INF/context.xml. Here is an example:

This will setup the JNDI for the ConectionFactory and Topic to work within Tomcat.

Here is some example code that will publish a test message to the MY.TEST.FOO Topic:

© 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