1 Reply Latest reply on Nov 16, 2008 1:33 AM by Tim Fox

    how to get my message selector to work

    ilango gurusamy Novice

      Hi
      I have used a message selector in my MDB as follows:

      @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "sessionID='1234567')
      (all on one line)

      on the servlet client that sends the messages I have the following:

      ObjectMessage message = session.createObjectMessage();
      QueueingEntity e = new QueueingEntity();// I create an entity bean to perist messages in a database

      e.setSessionID(sessionID);
      message.setObject(e);
      messageProducer.send(message);

      Now how can I carry out message filtering in the MDB so that if I type in '123456789' the MDB should filter that message out and not accept it.

      How can i test to see that a message containing '123456789' is not accepted when the MDB is reading the queue?

      Thanks