On 25/09/2007, Gordon Sim <[EMAIL PROTECTED]> wrote: > I think by closing the session the application is saying it wants to > quit. Perhaps the close on the MessageConsumer could do something like > this... i.e. don't return from that close until all the messages have > been pumped through the listener?
I agree. Currently if I understand the code correctly (Martin correct me if I am wrong) a close() on the message consumer will reject all prefetched messages. We could perhaps have some extended JMS methods on the consumer to: 1) closeImmediately (maybe closeJFDI() :-)) 2) closeRejecting (current behaviour) 3) closeAfterProcessing - close after processing any prefetched messages I personally think that the default close() should be (1) and that closing a session should do (1) on any unclosed consumers. RG
