Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 18422 invoked from network); 16 Apr 2007 15:44:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Apr 2007 15:44:35 -0000 Received: (qmail 42830 invoked by uid 500); 16 Apr 2007 15:44:29 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 42814 invoked by uid 500); 16 Apr 2007 15:44:29 -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 42801 invoked by uid 99); 16 Apr 2007 15:44:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Apr 2007 08:44:29 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of james.strachan@gmail.com designates 66.249.82.236 as permitted sender) Received: from [66.249.82.236] (HELO wx-out-0506.google.com) (66.249.82.236) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Apr 2007 08:44:22 -0700 Received: by wx-out-0506.google.com with SMTP id h29so1713403wxd for ; Mon, 16 Apr 2007 08:44:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gtQQ0vNyM9quEpenaBE1Fj9crCl1zm736R+phBT1ssIcBRPSJH+Mix1o7GOwN9V7D8bkWvGYqfkw84NK2QHRihU+pCEqc0yAhnlmJmfFOl9hOUxWv5ZlEpxRRMsZCDJOqGFyJEscjVv8snXm6zDeAOqyTCM4RZJ6VlEwjhkSXIc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=P3pojQL8r9Vovev+Bm4KeQQ+hT20w7CxRCUOUqv5qtWiKX+XeIohF5qU+izFhSdiBT3zDV/E0xSUJU3mngZuYiemy9XNNEKVn4RHa/0vKVcNYsR3pUhQOlidcn2kSO0Q2rk4oxUdKfOKJKapvAgbBO+Kbddmup2Qd563Faed3/M= Received: by 10.90.79.6 with SMTP id c6mr5066145agb.1176738241717; Mon, 16 Apr 2007 08:44:01 -0700 (PDT) Received: by 10.90.105.4 with HTTP; Mon, 16 Apr 2007 08:44:01 -0700 (PDT) Message-ID: Date: Mon, 16 Apr 2007 16:44:01 +0100 From: "James Strachan" To: users@activemq.apache.org Subject: Re: ActiveMQ object cleanup In-Reply-To: <10011742.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <460424C9.4090307@gmail.com> <10011742.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Transport threads die when the connection is closed. Session threads die when the connection is closed. On 4/16/07, drvillo wrote: > > Hi > > actually I also would like to know how to tell AMQ threads to quit... > Francesco > > > txtoth wrote: > > > > Well I thought I was on to something. I created a threadgroup and put my > > thread in it and sure enough the activemq created threads as part of my > > spring context creation get created in my thread group, great. Then when > > I close my spring context I get the threadgroup and call interrupt and > > my thread catches the interrupt exception and completes. The only > > problem is that now I've got threadgroups hanging around with only > > activemq related threads in them. It would appear that these threads > > aren't quiting when they receive the interrupt exception :( > > > > > > Xavier Toth wrote: > >> On further inspection I see that there are a number of threads started > >> on behalf of ActiveMQ and I'm wondering if and how these ever get > >> cleaned up? I've included a super simplified example of a standalone > >> broker and client along with build and run scripts (the classpath will > >> have to be changed for these to work on another system). The run > >> script will generate a hprof dump on exit (Ctrl-C) that can be > >> inspected with 'hat'. > >> > >> On 3/20/07, Xavier Toth wrote: > >>> I'm using Spring, Lingo and ActiveMQ. My processes routinely create > >>> new queues use them for awhile and then hopefully destroy them. But > >>> it's the last part that's got me concerned. I close the Spring context > >>> from which were created beans of class ActiveMQConnectionFactory, > >>> ActiveMQQueue, LingoRemoteInvocationFactory and a few others but > >>> despite my efforts to cleanup I'm getting OutOfMemory exceptions. I've > >>> run jmap and seen the number of instances of some of these classes > >>> growing > >>> overtime and through use. I've run hat on the hprof dumps and see > >>> that these > >>> objects are accessible from the rootset but it's unclear to me who is > >>> hanging on the their references. Is there anything I should be > >>> explicitly doing in my code when I close the context to make sure > >>> ActiveMQ cleans up it's objects? Are there any know memory leaks in > >>> ActiveMQ? I've experience similar results on 3.2.2 and 4.1.0. > >>> > >>> Ted > >>> > > > > > > > > -- > View this message in context: http://www.nabble.com/ActiveMQ-object-cleanup-tf3436806s2354.html#a10011742 > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- James ------- http://radio.weblogs.com/0112098/