2 Replies Latest reply on Nov 6, 2003 2:22 AM by basem_musa

    onMessage of MDB is never called.

    basem_musa Newbie

      Dear Sir,
      I'm trying to make onMessage of MDB called automatically when I put a message in a queue.
      but unfortunately it is never been invoked. I don't know why, It doesn't give me any exception of error.

      Here is the ejb-jar.xml file:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

      <ejb-jar >

      No Description.
      <display-name>Generated by XDoclet</display-name>

      <enterprise-beans>

      <!--
      To add session beans that you have deployment descriptor info for, add
      a file to your merge directory called session-beans.xml that contains
      the markup for those beans.
      -->

      <!-- Entity Beans -->

      <!--
      To add entity beans that you have deployment descriptor info for, add
      a file to your merge directory called entity-beans.xml that contains
      the markup for those beans.
      -->

      <!-- Message Driven Beans -->
      <message-driven >
      <![CDATA[Session Bean Template]]>
      <display-name>Test MDB</display-name>

      <ejb-name>kokoBean</ejb-name>

      <ejb-class>com.test.TestMDBBean</ejb-class>

      <transaction-type>Container</transaction-type>
      <message-driven-destination>
      <destination-type>javax.jms.Queue</destination-type>
      <subscription-durability>NonDurable</subscription-durability>
      </message-driven-destination>
      <security-identity>
      Use a role that is not assigned to any users to
      access restricted server side functionallity
      <run-as>
      <role-name>Server</role-name>
      </run-as>
      </security-identity>

      </message-driven>

      <!--
      To add message driven beans that you have deployment descriptor info for, add
      a file to your merge directory called message-driven-beans.xml that contains
      the <message-driven></message-driven> markup for those beans.
      -->

      </enterprise-beans>

      <!-- Relationships -->

      <!-- Assembly Descriptor -->
      <assembly-descriptor >

      <security-role>
      The role used to prevent access to the PrivateEntity
      bean from external users.

      <role-name>Server</role-name>
      </security-role>

      <!-- finder permissions -->

      <!-- finder permissions -->

      <!-- transactions -->

      <container-transaction>

      <ejb-name>kokoBean</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>NotSupported</trans-attribute>
      </container-transaction>

      <!-- finder transactions -->
      </assembly-descriptor>

      </ejb-jar>

      ===============
      the jboss.xml as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">



      <enterprise-beans>

      <message-driven>
      <ejb-name>kokoBean</ejb-name>
      <destination-jndi-name>queue/testQueue</destination-jndi-name>
      </message-driven>

      </enterprise-beans>



      =========
      note : this is exactly testmdb.zip posted in the JBoss site.

      Please help me...