Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 82195 invoked from network); 13 Jul 2006 18:55:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2006 18:55:47 -0000 Received: (qmail 73017 invoked by uid 500); 13 Jul 2006 18:55:46 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 72995 invoked by uid 500); 13 Jul 2006 18:55:46 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 72986 invoked by uid 99); 13 Jul 2006 18:55:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 11:55:46 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.100.65.198] (HELO BUTTHEAD.daxtechnologies.com) (66.100.65.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 11:55:44 -0700 Received: from BEAVIS.daxtechnologies.com ([192.168.0.1]) by BUTTHEAD.daxtechnologies.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 13 Jul 2006 14:54:21 -0400 Received: from [192.168.0.34] ([192.168.0.34]) by BEAVIS.daxtechnologies.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 13 Jul 2006 14:54:21 -0400 Message-ID: <44B6971A.6080407@daxtechnologies.com> Date: Thu, 13 Jul 2006 14:55:22 -0400 From: Adrian Tarau User-Agent: Thunderbird 1.5.0.4 (X11/20060615) MIME-Version: 1.0 To: activemq-users@geronimo.apache.org Subject: Re: Session closed after a while(random) References: <005e01c6a673$5fdce600$2802a8c0@Workstation> <44B64C76.4040102@daxtechnologies.com> <44B6524F.4050305@daxtechnologies.com> <44B65880.1010303@daxtechnologies.com> <44B65A60.4020302@daxtechnologies.com> In-Reply-To: <44B65A60.4020302@daxtechnologies.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 13 Jul 2006 18:54:21.0156 (UTC) FILETIME=[C03F3A40:01C6A6AD] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N James, do you want the sources or can you recommend me some actions? To create the session all the time, not to cache it? Adrian Tarau wrote: > Ok, so who close the session? :) > > James Strachan wrote: >> Sorry I forgot about that :) >> >> The only time a VM broker is shut down is explicitly via application >> code or a shutdown handler. >> >> On 7/13/06, Adrian Tarau wrote: >>> I use vm connector so no connection problems should be involved, right? >>> >>> James Strachan wrote: >>> > BTW are you using auto-reconnect? It could be that the socket is >>> > terminated due to some network issue? >>> > >>> > >>> http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html >>> >>> > >>> > >>> > On 7/13/06, Adrian Tarau wrote: >>> >> 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. >>> >> Thanks. >>> >> >>> >> 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(ActiveMQSession.java:577) >>> >>> >> >>> >> >> >>> >> >> at >>> >> >> >>> >> >>> org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:799)* >>> >>> >> >>> >> >> >>> >> >> >>> >> >> >>> >> > >>> >> > >>> >> >>> >> >>> > >>> > >>> >>> >> >> >