You should only close those resources when your app no longer wants to receive messages.
On 11 Jul 2008, at 13:02, Jigar Naik wrote:




Jigar Naik wrote:

Hi The uploaded file contains the consumer code. but the consumer is not receiving any messages even though there are 10 messages in the queue. I
have tried to debug the code. but i found it is not calling the
onMessage() method.

Am i missing something ?

http://www.nabble.com/file/p18401944/JConsumer.java JConsumer.java

Thanks
Jigar


Hey,

I have commented the following line of  code. and i received all the
messages. It is behaving the way it should now.

                        //consumer.close();
                        //session.close();
                        //connection.close();

but the question is now when should i close consumer, session and connection
object ???
--
View this message in context: 
http://www.nabble.com/JMS-consumer-is-not-receiving-any-messages.-am-i-missing-something---tp18401944p18402295.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Reply via email to