2 Replies Latest reply on May 27, 2003 6:29 AM by perroinmaui

    Steps to use MDB ?

    perroinmaui Newbie

      Hi,

      I have developed a Message driven bean, and it deploys fine. I have also created a queue which the bean is supposed to receive messages from.

      I also deployed a jboss.xml file where I tell the server that my bean is going to listen to my queue.

      Now, I create a client and send a message to the queue, but the bean never receives the message.

      THe onMessage method never wakes up. What am I doing wrong?

      I am using jboss 3.2.1.

      Here is my jboss.xml

      <?xml version="1.0"?>
      <enterprise-beans>

      <ejb-name>ejb/MailMessageBean</ejb-name>
      <local-jndi-name>MailMessageBean</local-jndi-name>
      <jndi-name>MailMessageBean</jndi-name>


      <message-driven>
      <ejb-name>MailMessageListenerMDB</ejb-name>
      <destination-jndi-name>queue/emailQueue</destination-jndi-name>
      <resource-ref>
      <res-ref-name>jms/ConnectionFactory</res-ref-name>
      <jndi-name>java:/ConnectionFactory</jndi-name>
      </resource-ref>
      <resource-ref>
      <res-ref-name>ejb/MailMessageBean</res-ref-name>
      <jndi-name>MailMessageBean</jndi-name>
      </resource-ref>
      </message-driven>

      </enterprise-beans>

      Thanks

        • 1. Re: Steps to use MDB ?
          Adrian Brock Master

          Do you see the message in the queue?

          Try undeploying the mdb and connect
          a QueueBrowser to the queue after the send.

          Regards,
          Adrian

          • 2. Re: Steps to use MDB ?
            perroinmaui Newbie

            Two things.

            1) you are right there seems to be no messages on the queue, even though the queue seems to be created just fine.

            2) I found that the MDB didn't deploy ok. I got a NameNotFoundException.

            See this is my problem; I have no problem staying up all night to get this to work, but there is no place I can look at that can tell me how this thing is suppossed to work. I am just guessing, and it is making me mad.
            Sorry, need to vent.

            THanks.