Change you selector value to: consumer.selector = reportID = + reportID;
If you run into similar problems with Consumers that define selector
expressions in the future, you can add the Message.Selector category to your
server-side logging filters. If a client's selector can't be evaluated
successfully, a warning is written to the server log containing the selector
and the message that was evaluated against it. Selector evaluation is based on
a javacc grammar and generated parser which unfortunately doesn't provide great
error messaging, but a bit of trial and error should get you rolling.
Best,
Seth
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf
Of netdeep
Sent: Wednesday, January 21, 2009 8:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] filtering blazeds messages
I have blazeds working on a channel I have set up, but how do you filter out
the
information you broadcast on that channel? If I want to send data to one
instance of my
application, but no another, how do I determine that. Here is how I set up the
message in
java and flex. I have tried setting the consumer.selector as it says to in the
documentation,
but that doesn't seem to do anything, at least not the way I'm doing it. Here
is the code:
!-- flex code --
mx:Consumer id=consumer destination=factory
message=msgHandler(event.message)/
!-- actionscript snippet
consumer.selector = reportID = '+reportID+';
consumer.subscribe();
--
// java code
message = new AsyncMessage();
message.setDestination(factory); // the channel I've set up
message.setClientId(clientID);
message.setMessageId(UUIDUtils.createUUID());
message.setTimestamp(System.currentTimeMillis());
message.setHeader(reportID, this.getRepID());
message.setBody(channelDef); // my object
service.pushMessageToClients(message, false);