Deploy the activemq/lib/optional/activemq-rar-5.3.0.rar file to glassfish. Then tell glassfish to use that ra adapter for the message listener. You can do this by creating a sun-ejb-jar and creating an entry for each ejb such as this:
<ejb>
<ejb-name>ExampleBean</ejb-name>
<mdb-resource-adapter>
<resource-adapter-mid>activemq-rar-5.3.0</resource-adapter-mid>
</mdb-resource-adapter>
</ejb>
[Message sent by forum member 'whshub' (whshub_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=390320