Glassfish V3.1 running embedded ActiveMQ for JMS (Updates)

Last year I described all steps to get running with ActiveMQ embedded in Glassfish:

Some updates :
The current version of ActiveMQ is 5.7.0. Here some updated download links
activemq-web-console-5.7.0.war (link)
activemq-rar-5.7.0.rar (link)
activemq-ra-5.7.0.jar (link)
activemq-all-5.7.0.jar (from the main package)

Note: you need to re-deploy the resource adapter with version 5.7 and check all connector settings.

It works fine with Glassfish and Java JDK 1.7.07

I had issues with the firewall due to fact ActiveQM uses a fix registration port for JMX but dynamic ports for the communication port. The web-console was not accessible.
“Exception occurred while processing this request, check the log for more information!”

Web Console

[#|2012-10-18T07:42:09.249+0000|WARNING|glassfish3.1.2||_ThreadID=73;_ThreadName=Thread-2;|StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception Connection timed out
at Method)

There are ways to configure this for a standalone ActiveMQ instance with the parameters connectorPort and rmiServerPort but I didnt find out yet how to do this with the embedded version.
As a workaround I changed this setting -Djava.rmi.server.hostname from my hostname to localhost.

JVM Settings

Glassfish V3.1 running embedded ActiveMQ for JMS (Part 3)

In the third and final part of this tutorial we will crate a MDB (Message Driven Bean) that listens to our embedded ActiveMQ from Part 1.



Glassfish V3.1 running embedded ActiveMQ for JMS (Part 1)

Updates 2012-10-18

I am quite OK with the build-in JMS in Glassfish (OpenMQ), as long you dont want to access queues from external applications or you need an admin console to easily create, delete queues, send messages and browse the queues. ActiveMQ is a good alternative. Unfortunately we could  not find any end2end description hot to get the couple Glassfish-ActiveMQ up and running (under Linux, Windows should be a quite similar affair).

This tutorial describes how to install and configure ActiveMQ as embedded JMS broker, and connect a MDB to it.


  • Running Glassfish 3.1 instance (or later).