activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Tarau <>
Subject Re: Session closed after a while(random)
Date Thu, 13 Jul 2006 14:01:51 GMT
I made a search for "close" in the source code and except from produces, 
consumers and inputstream and outputstream I don't close the connection 
or session, except on the JVM shutdown(Thread hook).

I can provide you(private - not on the mailing list) the source code 
because this is very annoying.

James Strachan wrote:
> Apart from inactivity timeouts on the transport layer, we generally
> don't close sessions. Are you sure nothing in your application code is
> trying to close the session?
> On 7/13/06, Adrian Tarau <> wrote:
>> I have this issue for some time with ActiveMQ 4.0 and 4.0.1.
>> I use vm transport and create one session used to produce and consume
>> messages. Everything works fine, days in a row, until it start to throw
>> exception that "Session is closed". There are any watch dogs that close
>> sessions after a while, based on some criteria?
>> I couldn't find any rule, when or why it happens.
>> Should I create the session all the time - I understood  is time
>> consuming and it should be safe to cache it.
>> Thanks.
>> *javax.jms.IllegalStateException: The Session is closed
>>     at
>> org.apache.activemq.ActiveMQSession.checkClosed( 
>>     at
>> org.apache.activemq.ActiveMQSession.createConsumer(* 

View raw message