JMS - Managing unacknowledged messages: buggy behaviour
Hi,
I'm experiencing a pretty weird situation accesing to a JMS queue. I have two messages in a queue (let's say they have IDs A and B). For each step I describe below, I use a Session.CLIENT_ACKNOWLEDGE but I don't acknowledge after read them (I want them to stay in the queue).
1. List the message with QueueReceiver without selector -> OK (A,B)
2. Access Message A with QueueReceiver with selector (JMSMessageID=A) -> OK
3. Access Message B with QueueReceiver with selector (JMSMessageID=B) -> ERROR!!! (Why does it fail?)
4. Access Message A with QueueReceiver with selector (JMSMessageID=A) -> ERROR!!! (It worked in step 2!)
5. Access Message B with QueueReceiver with selector (JMSMessageID=B) -> OK (this is the step failed in 3)
6. List the message with QueueReceiver without selector -> OK (B,A) Notice that the order has changed!
From this point, it works always in the same way ...
Is there anything I'm doing wrong? Am I missing something important? I'd really appreciatte any help with this problem. It's becoming a pain in my project.
Thanks in advance
Jorge Ortiz
P.S: BTW, I'm using Sun ONE 8 JMS queues.

