Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 85880 invoked from network); 2 Nov 2005 18:50:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Nov 2005 18:50:02 -0000 Received: (qmail 4106 invoked by uid 500); 2 Nov 2005 18:49:49 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 4091 invoked by uid 500); 2 Nov 2005 18:49:48 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 4080 invoked by uid 500); 2 Nov 2005 18:49:48 -0000 Delivered-To: apmail-jakarta-tomcat-user@jakarta.apache.org Received: (qmail 4077 invoked by uid 99); 2 Nov 2005 18:49:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 10:49:48 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of andy.kriger@gmail.com designates 64.233.162.205 as permitted sender) Received: from [64.233.162.205] (HELO zproxy.gmail.com) (64.233.162.205) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 10:49:43 -0800 Received: by zproxy.gmail.com with SMTP id x7so28050nzc for ; Wed, 02 Nov 2005 10:49:27 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=mc5LP8I+yowCmFOpcR7FxFei39IvyHubnhzwLOM5vJ/ice0X5Bu3kI/VsKjaNz+hl1yld43W9xm0povDCwJGQ/FwCdulZR9hBSPAbELFA+z3Q919SsTrK/px3SkteB4eKur/yDT695OVdH0BUuVC1v9KnqZMvaA8nArTrBztTlU= Received: by 10.36.23.16 with SMTP id 16mr4185066nzw; Wed, 02 Nov 2005 10:49:27 -0800 (PST) Received: by 10.36.141.18 with HTTP; Wed, 2 Nov 2005 10:49:27 -0800 (PST) Message-ID: <207fa8f0511021049y3c6aab44k6475e16019ba44ab@mail.gmail.com> Date: Wed, 2 Nov 2005 13:49:27 -0500 From: Andy Kriger To: tomcat-user@jakarta.apache.org Subject: Re: finalize question MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > See ... > http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?= pageId=3D2669 > > (I really need to update the FAQ on this one) > > -Tim Thanks for the info. A followup question... "The second one is where the application has ThreadLocal data that is attached to a container thread. In tomcat this thread will be part of the thread pool, so it will never be garbage collected." We use ThreadLocal to handle our Hibernate Session. In ServletContextListener.contextDestroyed, I call a destroy method on the class doing the handling that cleans up the Hibernate Sessions and nulls out the ThreadLocal. Will this allow it to be gc'd or will Tomcat still hold onto a reference? thx andy --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org