users@glassfish.java.net

MessageSelector not working for MDB's

From: <glassfish_at_javadesktop.org>
Date: Mon, 23 Apr 2007 07:48:41 PDT

Hi,

Currently tracking GF from CVS (latest update this morning). Using Java 6 01

I have this client that does this;

            final Topic topic = (Topic)getContext().lookup("jms/itemTopic");
            final Connection connection = getConnectionFactory().createConnection();
            final Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
            final MessageProducer messageProducer = session.createProducer(topic);
            final ObjectMessage objectMessage = session.createObjectMessage();
            objectMessage.setStringProperty("transcoded", "TRUE");
            objectMessage.setObject(item);
            messageProducer.send(objectMessage);
            session.close();
            connection.close();

and a MDB that has this:

@MessageDriven(mappedName = "jms/itemTopic", activationConfig = { @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "transcoded = 'TRUE'") })
public class TranscodeListenerBean implements MessageListener {
...
...


The problem is that the MDB fails to fire. I tried setting the TRUE outside of single quotes, or changing case etc... etc...

Nothing works.

Is this a bug?

-=david=-
[Message sent by forum member 'dharrigan' (dharrigan)]

http://forums.java.net/jive/thread.jspa?messageID=213743