0 Replies Latest reply on Jan 8, 2013 8:26 AM by wadam1972

    message driven bean never gets called

    wadam1972

      Hello! 

      I have problems with my message driven bean.

      My JBoss is Version 6.1.

      As described under https://community.jboss.org/wiki/HowToCreateJMSQueuetopicInAS6 I managed to create my queue "queue/searchtabQueue":

       

      <configuration xmlns="urn:hornetq"

                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                  xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">

           <queue name="searchtabQueue">

            <entry name="/queue/searchtabQueue"/>

         </queue>

      </configuration>

       

      Now my queue is listed correctly under "JMS Queues".

      My lookup code is the following

       

      Context ctx = new InitialContext(p);
      ConnectionFactory factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
      Queue queue = (Queue) ctx.lookup("queue/searchtabQueue");
      Connection connect = factory.createConnection();
      javax
      .jms.Session session = connect.createSession(false, 0);
      MessageProducer sender = session.createProducer(queue);
      TextMessage msg = session.createTextMessage();
      msg
      .setText("abc");
      sender
      .send(msg);
      connect
      .close();

       

      The code throws no exeception.

       

      My message driven bean has the following code:

       

      @MessageDriven(activationConfig =  {

              @ActivationConfigProperty(propertyName = "destinationType",

                                        propertyValue = "javax.jms.Queue"),

              @ActivationConfigProperty(propertyName = "destination",

                                        propertyValue = "queue/searchtabQueue"),

              @ActivationConfigProperty(propertyName = "acknowledgeMode",

                                        propertyValue = "Auto-acknowledge")

          })

      public class SearchTableBean implements MessageListener {

       

       

        @EJB

        private FreeLogLocal freeLogBean;

       

       

        public void onMessage (Message message) {

          freeLogBean.normalWrite("nosession", "SearchTableBean.onMessage");

        }

      }


      As far as I can see this bean never gets called.

       

      What can I do to get this working?

      Thanks alot for information

      Wolfgang