ejb@glassfish.java.net

MDB driven from ActiveMQ

From: Per Steffensen <steff_at_designware.dk>
Date: Wed, 25 Mar 2009 09:53:06 +0100

Hi

I have the attached application (it includes source) deployed in
Glassfish v2. I want the MDB to be driven from a queue named
"UserHandler RQ" on a ActiveMQ running at the same server.
I can see, from the ActiveMQ console, that the number of consumers on
queue "UserHandler RQ" increases by one when I start Glassfish, so it
seams like there are some kind of connection. But why is my MDB not
called, when I add messages to the queue???

I have been trying to set it up inspired by:
http://74.125.77.132/search?q=cache:JyepVPQR7DoJ:activemq.apache.org/sjsas-with-genericjmsra.html+asadmin+glassfish+documentation+create-resource-adapter-config&cd=5&hl=da&ct=clnk&gl=dk

and
http://weblogs.java.net/blog/rampsarathy/archive/2007/03/glassfish_v2_an.html


Besides installing the application, I have run the following, with succes:

<glassfish install>/bin/asadmin create-resource-adapter-config
--property
SupportsXA=false:RMPolicy=OnePerPhysicalConnection:ProviderIntegrationMode=javabean:ConnectionFactoryClassName=org.apache.activemq.ActiveMQConnectionFactory:QueueConnectionFactoryClassName=org.apache.activemq.ActiveMQConnectionFactory:TopicConnectionFactoryClassName=org.apache.activemq.ActiveMQConnectionFactory:XAConnectionFactoryClassName=org.apache.activemq.ActiveMQXAConnectionFactory:XAQueueConnectionFactoryClassName=org.apache.activemq.ActiveMQXAConnectionFactory:XATopicConnectionFactoryClassName=org.apache.activemq.ActiveMQXAConnectionFactory:UnifiedDestinationClassName=org.apache.activemq.command.ActiveMQDestination:QueueClassName=org.apache.activemq.command.ActiveMQQueue:TopicClassName=org.apache.activemq.command.ActiveMQTopic:ConnectionFactoryProperties=brokerURL\\=tcp\\://127.0.0.1\\:61616:LogLevel=FINE
eMjavaee#genericra

<glassfish install>/bin/asadmin create-connector-connection-pool
--raname eMjavaee#genericra --connectiondefinition
javax.jms.QueueConnectionFactory --transactionsupport LocalTransaction
ActiveMQQueueConnectionFactoryPool

<glassfish install>/bin/asadmin create-connector-resource --poolname
ActiveMQQueueConnectionFactoryPool jms/SimpleQueueConnectionFactory

So the question again: Why is my MDB not called, when I add messages to
the queue?

Thanks alot!