Thanks Dave, that was it!

Cheers,

Joost.

----- Original Message -----
From: "Dave Smith" <[EMAIL PROTECTED]>
To: "Joost v.d. Wijgerd" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 7:42 PM
Subject: Re: [JBoss-user] JBossMQ selector question


> Did you start the connection?
>
> Joost v.d. Wijgerd wrote:
> > Hi,
> >
> > I have a QueueBrowser that is polling a queue. I display this queue in a
> > Swing client. When the user takes an action I want to get the message
> > from the queue, so I make a selector based on the JMSMessageID.
> > Unfortunately this doesn't seem to work.. can somebody tell me what I'm
> > doing wrong? Below is a code snippet..
> >
> > thanx,
> >
> > Joost
> >
> > <snippet>
> > String selector = "JMSMessageID='" + msg.getJMSMessageID() + "'";
> > // fetch it from the queue
> > QueueReceiver receiver = session.createReceiver(queue,selector);
> > msg = receiver.receiveNoWait();
> > if(msg != null) {
> > // ok .. we have it put it in some other list
> > System.out.println("Got Message");
> > } else {
> > // @todo: show dialog
> > System.out.println("Message not available anymore");
> > }
> > // close the receiver
> > receiver.close();
> > </snippet>
>
>
>



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to