The implementation as it is assumes that a Session is not idle if it has consumers open.. so if you want to return it back to the pool, you'd close it, which returns it to the pool and closes all consumers.
Can you just hold the session that you have when you first create it? On Fri, Mar 28, 2014 at 3:27 AM, FeiYang <yangfe...@gmail.com> wrote: > Hi, > > I am using PooledConnecitonFactory/PooledConnection to enhance the > performance. > > After reading the source code, I can create a PooledSession from > PooledConnection, but there is no way to return the PooledSession back. > > User case: > 1. create a PooledSession s1; > 2. create a consumer c1 on s2; > 3. return the session back so reuse it laterly(no way to do so, and I do not > want to close the session as the consumer is under working) > > Any one has any suggestion on this? > > Thanks > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/PooledSession-No-way-return-it-back-tp4679628.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- Christian Posta http://www.christianposta.com/blog twitter: @christianposta