The test mentioned in the subject seems to test for behavior that is not
JMS compliant. Specifically it consumes from a queue with two messages,
receives one message, closes the consumer, consumes from the same queue
again and expects both messages to be there. Essentially it is testing
that closing the consumer will push the messages back onto the queue.
This seems to directly contradict the semantics described here:
http://java.sun.com/products/jms/faq.html#msg_ack_close
I'd like to change this behavior since one of the modifications I've had
to make for 0-10 support is to move certain per/message state that is
currently held by the consumer objects into the session so that we
wouldn't, e.g. forget to acknowledge messages from consumers that are
closed. The natural consequence of this change is that the state of
outstanding messages is unaffected by consumers closing, which does seem
consistent with the intended JMS semantics, but is unfortunately causing
this test to fail.
I'd like to modify the test to not expect the message to be redelivered
after the first consumer is closed. Please let me know if you differ
with my interpretation of the intended JMS semantics or object to this
change for any other reason.
--Rafael