Re: [JBoss-user] JBossMQ selector question

2002-03-20 Thread Joost van de Wijgerd

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



[JBoss-user] JBossMQ selector question

2002-03-19 Thread Joost v.d. Wijgerd



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,JoostsnippetString selector = 
"JMSMessageID='" + msg.getJMSMessageID() + "'";// fetch it from the 
queueQueueReceiver receiver = session.createReceiver(queue,selector);msg 
= receiver.receiveNoWait();if(msg != null) {// ok .. we have it put it 
in some other listSystem.out.println("Got Message");} else {// 
@todo: show dialogSystem.out.println("Message not available 
anymore");}// close the 
receiverreceiver.close();/snippet