3 Replies Latest reply on Jan 26, 2012 9:37 AM by Ed Keen

    JBoss 7.1: MDB not consuming ActiveMQ messages

    Ed Keen Newbie

      Distribution:  jboss-as-7.1.0.Final-SNAPSHOT (as of 1/24/2012)

       

      I am trying to get a test MDB to listen on a test ActiveMQ queue.  So far, I have written a simple class that can put messages on and a listener that can take messages offf, so I know that ActiveMQ is setup correctly.  However, when I try to connect an MDB to the same queue, it never picks up the message.  Here is what I have done:

       

      1.  Copy activemq-rar-5.4.3.rar to standalone/deployments

       

      2.  Add the following to standalone.xml:

       

              <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">

                 <resource-adapters>

                      <resource-adapter>

                          <archive>activemq-rar-5.4.3.rar</archive>

                          <transaction-support>LocalTransaction</transaction-support>

                          <config-property name="ServerUrl">tcp://localhost:61616</config-property>

                      </resource-adapter>

                 </resource-adapters>

              </subsystem>

       

      3.  Added the following annotations to my MDB:

       

      @MessageDriven(name="TestAQService", activationConfig = {

                          @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),

                          @ActivationConfigProperty(propertyName = "destination",     propertyValue = "amqTest") })

      @TransactionManagement(value= TransactionManagementType.CONTAINER)

      @TransactionAttribute(value= TransactionAttributeType.REQUIRED)

      @ResourceAdapter(value="activemq-rar-5.4.3.rar")

       

       

      JBoss starts fine with the following pertinent log entries:

       

      INFO  [org.jboss.as.ejb3] JBAS014142: Started message driven bean 'TestAQService' with 'activemq-rar-5.4.3' resource adapter

      INFO  [org.jboss.as.server] JBAS018559: Deployed "trade-services.ear"

      INFO  [org.jboss.as.server] JBAS018559: Deployed "activemq-rar-5.4.3.rar"

       

      Everything looks like it started ok, but when I put a message on the queue, the MDB does not consume it. 

       

      Please let me know if there is anything wrong with my configuration.

       

      Thanks,

      Ed