2 Replies Latest reply on Jul 12, 2006 4:08 AM by malmei

    Problem with MDB not finding it's queue

    malmei

      Hi

      I have a problem with a MessageDrivenBean which (by the look of it) doesn't connect to it's destination queue.

      @Stateless
      @MessageDriven(activationConfig =
      {
       @ActivationConfigProperty(propertyName="destinationType",propertyValue="javax.jms.Queue"),
       @ActivationConfigProperty(propertyName="destination",propertyValue="queue/mdpojo"),
       @ActivationConfigProperty(propertyName="user",propertyValue="guest"),
       @ActivationConfigProperty(propertyName="password",propertyValue="guest"),
       @ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="AUTO_ACKNOWLEDGE")
      })
      // public class MsgConsumerBean implements MsgConsumerLocal,MsgConsumerRemote,MessageDrivenBean {
      public class MsgConsumerBean implements MessageListener,MessageDrivenBean {
      [ ... ]
      }
      


      The queue is existing, I wrote a small program to browse it and there are 11 messages in it.

      I also have a MDPOJO

      @Consumer(activationConfig= {
       @ActivationConfigProperty(propertyName="destinationType",propertyValue="javax.jms.Queue"),
       @ActivationConfigProperty(propertyName="destination",propertyValue="queue/echo"),
       @ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="AUTO_ACKNOWLEDGE")
      })
      public class EchoBean implements Echo {
      [ ... ]
      }
      


      which works just fine. In the logfile I can see lines like

      ...
      2006-07-11 14:05:11,007 DEBUG [org.jboss.ejb3.mdb.ConsumerContainer] Got destination type Queue for EchoBean
      2006-07-11 14:05:11,007 DEBUG [org.jboss.ejb3.mdb.ConsumerContainer] jndiSuffix: echo
      ...
      


      but nothing similar for the MsgConsumerBean. The bean is definitivly deployed and I can see it's initialisation in the logfile. Everything is perfect, except that it's not trying to connect to the queue.

      btw: echo and mdpojo are identically defined (except for the name)

      Is there anything one has to do (besides annotations) to have a MDB connect to a queue?

      Malte