See this article for a description of how to connect Glassfish 3 to an ActiveMQ 5 broker, and consume messages using a Message Driven Bean:

Glassfish 4.1


  1. Add resource adapter
    1. Download the resource-adapter file suitable to your broker version:
    2. Deploy the  resource adapter with the name "activemq-rar"

    3. Configure resource adapter
      (Failover Setup)

  2.  Create connector connection pool

  3. Create a connector resource (JNDI-Mapping for connection pool)

  4. Configure JNDI mapping for a queue

  5. Deploy your message driven beans and use the configured jndi names
© 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