Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 84922 invoked from network); 11 Nov 2010 19:44:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Nov 2010 19:44:13 -0000 Received: (qmail 22573 invoked by uid 500); 11 Nov 2010 19:44:42 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 22448 invoked by uid 500); 11 Nov 2010 19:44:41 -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 22439 invoked by uid 99); 11 Nov 2010 19:44:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Nov 2010 19:44:41 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [76.13.13.45] (HELO smtp106.prem.mail.ac4.yahoo.com) (76.13.13.45) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 11 Nov 2010 19:44:35 +0000 Received: (qmail 56082 invoked from network); 11 Nov 2010 19:44:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:X-Mailer:Thread-Index:Content-Language; b=grBEL/PQH2wObCRemk99rWHfq1Pli6Ou9FW6eiMqW0aGzv8L1tOsvHW25QQuy8pAdzqz+DmhGwk/OqMXywHHH6kExEqcryFxEnu9RaKL8p6MNgAQdj11Wqcv3OJC4y8UziCXdnwCg2pprQjCdSNJFheggfMxUtaKPoYl9xAJ6iA= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1289504654; bh=yrMHeBFisCEqk4t1hux+78azlu8hoBsKsv6SqlpyB90=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:X-Mailer:Thread-Index:Content-Language; b=bC4KIFhdOpmbc34htaCH6koIgb66XXbuEtXg1Wko+xDy2dFF9IbqEZZSlWVYiN49btNPdR7MGJi73RToEcFRD6OP9+W/Nuscg2b6nKHbBMGjWmOd5d978hyxzz+FgvKiuLSWtErIjYUv9nuvay+JCEFW/of7HqggTRORV7D0bfQ= Received: from BBW7 (bbprefix-mail@190.233.215.101 with login) by smtp106.prem.mail.ac4.yahoo.com with SMTP; 11 Nov 2010 11:44:13 -0800 PST X-Yahoo-SMTP: tozTPAqswBADGlZnplBDlcm0Dpndo4ZqE94JOFM- X-YMail-OSG: PtJjigYVM1mECGc3cxUHsQ8FQdAUl6hMJWMux26bx.iqm6u Y4DLU_0lGVOTaY8MBqaVJCDo8gOz2kg_8MxQVyF5sl96hDU6vda.Ct9zEblS kwsLCwmC4X8IzDl9o6RicTdDN1wo9Fd4k.QGs9Buszhs8gP7xCF_gmTt5TDQ MstjcvW15OQd9aXgtFYaU4VjyENG3lTPJwFzVLIW2I3liZgrRzL1uCshk2yN SJYJNJscom9unDUeuUlwNzyUtYj4jyoXyYRVBX6eDfTJbC81VK0dSVHESV2o iWN7KF8lrlkZfh660x0tnJvqJo6qzhFum7QiqHP8ttEchlKsue4ke87RocFs dgZo- X-Yahoo-Newman-Property: ymail-3 From: "Brian" To: "'Tomcat Users List'" References: <014f01cb81d1$d3460340$79d209c0$@yahoo.com> <1289502360.32281.6.camel@ben-laptop> <015701cb81d6$47ca5d20$d75f1760$@yahoo.com> <99C8B2929B39C24493377AC7A121E21F99F8B4E299@USEA-EXCH8.na.uis.unisys.com> In-Reply-To: <99C8B2929B39C24493377AC7A121E21F99F8B4E299@USEA-EXCH8.na.uis.unisys.com> Subject: RE: Tomcat 6.0.29 using more and more RAM until it collapses? Date: Thu, 11 Nov 2010 14:44:05 -0500 Message-ID: <015801cb81d8$cd84e9b0$688ebd10$@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0159_01CB81AE.E4B3C3B0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKW4xfE0ZIreY1yEiORcXvdSO2x1QFAF4z0Abg96fEBvMwycZGwQDZA Content-Language: en-us ------=_NextPart_000_0159_01CB81AE.E4B3C3B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Chuck, Yes, in a Finally block. This is what I do: void closeRsStmt(ResultSet resultSet) { //"Close" the connection, so it goes back to the pool Statement stmt=null; Connection conn=null; try { if (resultSet!=null ) { stmt = resultSet.getStatement(); resultSet.close(); } } catch (SQLException ex) { } try { if (stmt!=null ) { conn=stmt.getConnection(); stmt.close(); } } catch (SQLException ex) { } try { if (conn!=null) { conn.close(); } } catch (SQLException ex) { } resultSet = null; stmt = null; conn = null; } > -----Original Message----- > From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] > Sent: Thursday, November 11, 2010 02:32 PM > To: Tomcat Users List > Subject: RE: Tomcat 6.0.29 using more and more RAM until it collapses? > > > From: Brian [mailto:bbprefix-mail@yahoo.com] > > Subject: RE: Tomcat 6.0.29 using more and more RAM until it collapses? > > > After I perform a SQL sentence, I close the objects (result set, then > > its statement). > > In a finally block? If not, you'll leave them open when an exception occurs. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE > PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If > you received this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org ------=_NextPart_000_0159_01CB81AE.E4B3C3B0--