This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Bryan Copeland

+ Follow
since May 17, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bryan Copeland

You need to be sure to include activemq5.3.1-all.jar in your project buildpath, they all come from the ActiveMQ library...
There's a shortcut which I found after lots of sifting through online resources/specs and


1. you just need to create your own like a regular .properties file (start a plaintext file in your IDE and rename .properties, or, just a basic text editor like vi or notepad)

2. set the JMS properties to the location of your actual JMS server, some optional config, and any Topic or Queue names you want to create

3. package the as a .jar and include it in your buildpath (simply add as a library in your IDE and it will automagically add to your buildpath)

My sample for ActiveMQ:

Check these out for more info:
ActiveMQ -
jBoss -
I've managed to write both an AJAX and a JAVA JMS client (in this case for ActiveMQ's JMS broker). Each have been working to consume and produce JMS messages as separate projects, unfortunately though, trying to run them in the same project does not work (possibly because of my own misunderstanding of Tomcat's limitations as a J2EE container). What I'm trying to do is have the JAVA client act as an "always-on" listener for when the AJAX JMS client is not listening (i.e. browser is closed). When a browser client opens, the (constantly running) JAVA client can ignore the messages... but... when no browser client is initialized, the JAVA client should respond to the messages on behalf of the AJAX client.

I've tried using a ServletContextListener pattern, which I was hoping would launch the JAVA listener via its main method, whenever the Servlet gets initialized (i.e. it would auto-start when Tomcat gets restarted, or, anytime the Servlet gets redeployed) but it seems Tomcat is not thread-safe and this might be causing some problems. In any case, I can't seem to get the JAVA client to reliably start running and stay running for the lifetime of my AJAX client (webapp .war), and without including them in the same project and same J2EE container sharing the same ServletContext, I don't know how its possible to ensure they are running, starting and stopping at the same time.

If anyone knows a solution for running AJAX and JAVA JMS connectors together, please share...