0 Replies Latest reply on Mar 31, 2011 2:46 AM by rishi321

    MESSAGE DRIVEN BEAN STOPS WORKING

    rishi321

      when the server starts up I can see it checking for messages, but for some times it doesn't try to grab messages any more. I haven't monitored it that closely to know the exact timing, but I know it's not even trying to check because I have it in debug mode and I don't see the message commands being executed at all and also messages are queued not grab by message driven.

       

      here is my ejb-jar.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <ejb-jar id="ejb-jar_ID" version="3.0" 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">

          <display-name>MessageEJB</display-name>

      <enterprise-beans>

            <message-driven>
                 <display-name>MessageBean</display-name>
                 <ejb-name>MessageBean</ejb-name>
                 <ejb-class>com.ecomm.ejb.mdb.MessageBean</ejb-class>
                 <messaging-type>javax.jms.MessageListener</messaging-type>
                 <transaction-type>Container</transaction-type>
                 <message-destination-type>javax.jms.Queue</message-destination-type>
                 <activation-config>
                      <activation-config-property>
                           <activation-config-property-name>destinationType</activation-config-property-name>
                           <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
                      </activation-config-property>
                      <activation-config-property>
                           <activation-config-property-name>destination</activation-config-property-name>
                           <activation-config-property-value>/queue/ExpiryQueue</activation-config-property-value>
                      </activation-config-property>
                 </activation-config>
            </message-driven>
      </enterprise-beans>

       

       

      Here is my Jboss.xml

       

      <?xml version="1.0"?>

      <jboss>

          <enterprise-beans>

              <message-driven>

                  <ejb-name>MessageBean</ejb-name>

                  <destination-jndi-name>/queue/ExpiryQueue</destination-jndi-name>

                  <resource-ref>

                    <!--   <res-ref-name>jms/QCF</res-ref-name>

                      <jndi-name>ConnectionFactory</jndi-name>

                       -->

       

                       <res-ref-name>MessageBean</res-ref-name>

                      <jndi-name>/queue/ExpiryQueue</jndi-name>

       

       

                  </resource-ref>

              </message-driven>

          </enterprise-beans>

      </jboss>

       

       

      and ejb

      /** * Message-Driven Bean implementation class for: MeaageBean * */@MessageDriven(mappedName = "/queue/ExpiryQueue", activationConfig = {        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")})public class MessageBean implements MessageListener {