Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 45809 invoked from network); 3 Jul 2009 14:32:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jul 2009 14:32:18 -0000 Received: (qmail 55257 invoked by uid 500); 3 Jul 2009 14:32:25 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 55228 invoked by uid 500); 3 Jul 2009 14:32:25 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 55188 invoked by uid 99); 3 Jul 2009 14:32:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jul 2009 14:32:25 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jul 2009 14:32:13 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MMjns-0003Qq-Tr for users@activemq.apache.org; Fri, 03 Jul 2009 07:31:52 -0700 Message-ID: <24324078.post@talk.nabble.com> Date: Fri, 3 Jul 2009 07:31:52 -0700 (PDT) From: Eric-AWL To: users@activemq.apache.org Subject: connection.close(), on a brokenConnection resolves my problem In-Reply-To: <24322525.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: eric.vincent@atosorigin.com References: <24071802.post@talk.nabble.com> <3a73c17c0906190428w27b6fb85k62b062494793d573@mail.gmail.com> <24109839.post@talk.nabble.com> <3a73c17c0906190543u45caf0efuebd784150d6cf86d@mail.gmail.com> <24322525.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org NEW If I force a brokenConnection.close() into the onException callback, (called when the "other" connection is broken), my process can now terminate gracefully and is not blocked waiting threads die. However there is a JMSException thrown by this "close" on a brokenConnection. But it is not a big problem. I think it is not the way ActiveMQ should work. Eric-AWL Eric-AWL wrote: > > I think that I have some news. > > The problem is more complex than I wrote initially (I wanted to be clear). > > In fact, I have two ActiveMQ connections initialized in the same "main" > JVM. One with an embedded broker, the second with a distant broker > embedded in an "other" JVM. Some threads didn't die when I want to > shutdown my "main" JVM in this condition : > - I stop the "other" JVM gracefully. > - OnException is called on the "main JVM", but I don't close sessions nor > close this connection on the main JVM, since I think that this is done > automatically. > - I want to stop the "main" JVM by closing session on the embedded > connection, closing connection, and shutdown the embedded broker. > > It is in this configuration that some sessions are not closed and my > process doesn't want to stop gracefully. > > I think that threads that don't die are finally affected to the broken > connection. > I can see that "ActiveMQ Connection Worker" thread associated with my > broken connection is always active. > > What is the best way to deal with this problem ? > > Thank you > Eric-AWL > > > > > Gary Tully wrote: >> >> session.close should do it! >> >> 2009/6/19 Eric-AWL >> >>> >>> Hi ! >>> >>> No, I don't use Web console at all. But I use JMX console. >>> >>> Do you know the conditions required for a thread session to terminate ? >>> Should session.close() be enough or have we to wait for some kind of >>> timeout >>> (Inactivity) before the thread die ? ... I extensively use network of >>> brokers too (in relatively complex configurations), and it is possible >>> that >>> some related consumers/producers continue to be active on other nodes. >>> >>> I am in a full AUTO_ACKNOWLEDGEMENT configuration. >>> >>> >>> If you explain me when a session thread is supposed to die, I will try >>> to >>> find where is located the error. >>> >>> >>> >>> >>> Gary Tully wrote: >>> > >>> > I wonder are you experiencing >>> > https://issues.apache.org/activemq/browse/AMQ-2169 >>> > >>> > 2009/6/17 Eric-AWL >>> > >>> >> >>> >> Hi >>> >> >>> >> in 5.3-snapshot and 5.2 release, I think I correctly close >>> >> consumers/producers/session and the threads like this one : >>> >> >>> >> ActiveMQ Session: ID:td0sib01s-32880-1245239727292-2:0:25 >>> >> >>> >> doesn't seem to die. >>> >> >>> >> Is there something to do ? >>> >> >>> >> Eric-AWL >>> >> -- >>> >> View this message in context: >>> >> >>> http://www.nabble.com/Do-you-know-when-ActiveMQ-Session-threads-dies---tp24071802p24071802.html >>> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>> >> >>> >> >>> > >>> > >>> > -- >>> > http://blog.garytully.com >>> > >>> > Open Source Integration >>> > http://fusesource.com >>> > >>> > >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Do-you-know-when-ActiveMQ-Session-threads-die---tp24071802p24109839.html >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>> >>> >> >> >> -- >> http://blog.garytully.com >> >> Open Source Integration >> http://fusesource.com >> >> > > -- View this message in context: http://www.nabble.com/Do-you-know-when-ActiveMQ-Session-threads-die---tp24071802p24324078.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.