12 Replies Latest reply on Aug 12, 2011 8:45 AM by Andy Taylor

    session auto close problem

    jeffery c Newbie

      hi all.

          i've read the manual, which mention that the producer/consumer is reusable and should not be create everytime. so i create a consumer which is setup a MessageHandler to aysnc-receive message. and somehow i got this warn:


      2011-8-11 22:28:11 org.hornetq.core.logging.impl.JULLogDelegate warn

      warn: I'm closing a core ClientSession you left open. Please make sure you close all ClientSessions explicitly before letting them go out of scope! 19723987

      2011-8-11 22:28:11 org.hornetq.core.logging.impl.JULLogDelegate warn

      warn: The ClientSession you didn't close was created here:


        at org.hornetq.core.client.impl.DelegatingSession.<init>(DelegatingSession.java:94)

        at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:740)

        at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:295)


      my question is, when should i close my consumer? once i close the consumer, can it be reopen?(how to reuse, now i just don't close it and leave it there listening to the queue). i want the messageHandler work for the whole time.