11 Replies Latest reply on Jan 31, 2013 3:30 PM by Hitz Jain

    MDB not recognized as a consumer in JBoss EAP 5.1.2

    jhannah Newbie

      Hello,

       

      I had an application running in JBoss AS 6.1, however, we're looking to transition to JBoss EAP 5.1.2.  My application uses MDBs configured within jboss.xml and ejb-jar.xml files.  Unfortunately, when I run my application, the MDBs are not registered with the queues as consumers as the JBoss Admin shows the consumer count for my queues as 0.  I can add messages to the queue successfully, but since there are no MDBs consuming, the message never gets consumed.

       

      Is there something missing from the jboss.xml or ejb-jar.xml that is required in JBoss EAP 5.1.2 (see my files below)?  Or, is there some step during HornetQ installation that I may have missed that will enable MDBs? (JBoss AS 6.1 didn't require a separate HornetQ installation, so I may have missed something).

       

      Any suggestions would be appreciated.

       

      Thanks,

       

      jhannah

       

      jboss.xml:
      <?xml version="1.0" encoding="utf-8"?>
      <jboss xmlns:xs="http://www.jboss.org/j2ee/schema"
      xs:schemaLocation="http://www.jboss.org/j2ee/schema jboss_5_0.xsd"
      version="5.0">

      <enterprise-beans>
        <message-driven>
         <ejb-name>PendingConsumer</ejb-name>
         <destination-jndi-name>/queue/PendingQueue</destination-jndi-name>
        </message-driven>
        <message-driven>
         <ejb-name>RequestConsumer</ejb-name>
         <destination-jndi-name>/queue/RequestQueue</destination-jndi-name>
        </message-driven>
      </enterprise-beans>
      </jboss>

       

      ejb-jar.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
      version="3.0">

      <enterprise-beans>
        <message-driven>
         <ejb-name>PendingConsumer</ejb-name>
         <ejb-class>net.rim.serviceplan.services.workers.PendingConsumer</ejb-class>
         <transaction-type>Bean</transaction-type>
         <message-destination-type>javax.jms.Queue</message-destination-type>
         <activation-config>  
          <activation-config-property>
           <activation-config-property-name>acknowledgeMode</activation-config-property-name>
           <activation-config-property-value>AUTO_ACKNOWLEDGE</activation-config-property-value>
          </activation-config-property>
         </activation-config>
        </message-driven>
        <message-driven>
         <ejb-name>RequestConsumer</ejb-name>
         <ejb-class>net.rim.serviceplan.services.workers.RequestConsumer</ejb-class>
         <transaction-type>Bean</transaction-type>
         <message-destination-type>javax.jms.Queue</message-destination-type>
         <activation-config>  
          <activation-config-property>
           <activation-config-property-name>acknowledgeMode</activation-config-property-name>
           <activation-config-property-value>AUTO_ACKNOWLEDGE</activation-config-property-value>
          </activation-config-property>
         </activation-config>
        </message-driven>
      </enterprise-beans>
      </ejb-jar>