Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 27984 invoked from network); 5 Aug 2009 17:39:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Aug 2009 17:39:32 -0000 Received: (qmail 60134 invoked by uid 500); 5 Aug 2009 17:38:18 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 59806 invoked by uid 500); 5 Aug 2009 17:38:17 -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 58834 invoked by uid 99); 5 Aug 2009 17:36:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 17:36:15 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [76.96.27.228] (HELO QMTA15.emeryville.ca.mail.comcast.net) (76.96.27.228) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 17:36:04 +0000 Received: from OMTA24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by QMTA15.emeryville.ca.mail.comcast.net with comcast id QgBl1c0041zF43QAFhbkLF; Wed, 05 Aug 2009 17:35:44 +0000 Received: from [192.168.1.101] ([69.143.128.194]) by OMTA24.emeryville.ca.mail.comcast.net with comcast id Qhe41c0044BnRt98khe5Sj; Wed, 05 Aug 2009 17:38:06 +0000 Message-ID: <4A79C2EC.7040305@christopherschultz.net> Date: Wed, 05 Aug 2009 13:35:40 -0400 From: Christopher Schultz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.1) Gecko/20090715 Thunderbird/3.0b3 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Right way to close database connection pool References: <4A79B6BD.10302@gmail.com> <4A79BBC1.9060402@hanik.com> In-Reply-To: <4A79BBC1.9060402@hanik.com> X-Enigmail-Version: 0.96a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Filip, On 8/5/2009 1:05 PM, Filip Hanik - Dev Lists wrote: > you would need to listen for context destroyed, and cast the datasource > to call close() on it When Tomcat re-deploys an application, is the existing DataSource trashed and re-created? When that happens, are the old connections closed? The OP's comments suggest that the old connections are not being closed. Is this expected behavior? Why are Tomcat-created, webapp-specific (that is, s from META-INF/context.xml) DataSources not cleaned-up after web application un-deployment? It would seem that those resources are not applicable to any other webapp (because they came from a specific webapp's configuration) and should be torn-down during an undeployment. Am I missing a use case where this makes sense? Thanks, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkp5wuwACgkQ9CaO5/Lv0PC67wCgmaWYuITuwNaoE/Qc3oHuiinp 8+wAnjjHV3WTGF3uq4EhbVsUWLtJpFJ4 =Q63e -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org