From section 4.3.5 of the spec:
"A close terminates all pending message receives
on the connections sessions consumers. The
receives may return with a message or null
depending on whether or not there was a message
available at the time of the close."
At the moment, Connection.close() blocks until the
receive() completes. If the receive() uses unlimited
timeout, and doesn't receive any message,
Connection.close() blocks indefinitely.
Logged In: YES
user_id=557161
Also, the SimpleConsumer example closes the session
and connection within MessageListener.onMessage() -
this should not be possible as this violates section
4.3.5 of the specification.
Logged In: YES
user_id=557161
Fixed in CVS. The fix will be available in the 0.7.6 release.