0 Replies Latest reply on Oct 10, 2002 7:30 PM by joaocm

    Help With MessageDriven Beans

    joaocm

      Anyone could help me with MDB's ?

      I have a MDB that is waiting for messages on queue called Search, below is a piece of my jboss.xml file :

      <message-driven>
      <ejb-name>Search</ejb-name>
      <destination-jndi-name>queue/Search</destination-jndi-name>
      <configuration-name>Standard Message Driven Bean</configuration-name>
      </message-driven>


      I have a EJB Stateless Sesion Bean that tries to send a message to my MDB bean as follows :
      Context myCtx = new InitialContext();
      javax.jms.QueueConnectionFactory qf = (javax.jms.QueueConnectionFactory) myCtx.lookup("ConnectionFactory");
      javax.jms.Queue queue = (javax.jms.Queue)myCtx.lookup("queue/Search");
      javax.jms.QueueConnection qc = qf.createQueueConnection();
      javax.jms.QueueSession qs = qc.createQueueSession(true, javax.jms.Session.AUTO_ACKNOWLEDGE);
      javax.jms.TextMessage msg = qs.createTextMessage("Message test");
      javax.jms.QueueSender sender= qs.createSender(queue);
      sender.send(msg);
      sender.close();
      qs.close();
      qc.close();


      When I run that with JBoss 3.0.0 i'm getting :

      org.jboss.mq.il.oil.OILClientILService - Waiting for the server to connect to me on port 1900

      It looks like that the message was sent but the client (the MDB) don't get it. What I have to do to my MDB gets the message ??? Someone has a code/tutorial where I can look at ?

      Thanks in advance