More Java posts
May 01, 2003
JMS - Trap For Young Players

So this is pretty embarassing. I'm trying to remove messages from a JMS queue. I created a message selector that selected the messages I wanted to remove. I created a receiver using the selector but when I called the receive method I didn't get anything back. I tried receive(), receive(1000), and receiveNoWait() and nothing worked. However, if I created a browser with the same selector I saw the messages I wanted.

Turns out I forgot to call start() on the connection before calling receive() on the receiver. Hence no messages. Oh dear.

Posted by Alex at May 01, 2003 11:56 AM
Comments
As the Japanese say, "Even monkeys fall from trees." Posted by: mss on May 1, 2003 06:06 PM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?