Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 62839 invoked from network); 1 Oct 2003 09:06:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Oct 2003 09:06:43 -0000 Received: (qmail 72161 invoked by uid 500); 1 Oct 2003 09:05:56 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 72140 invoked by uid 500); 1 Oct 2003 09:05:56 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 72125 invoked from network); 1 Oct 2003 09:05:56 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.183) by daedalus.apache.org with SMTP; 1 Oct 2003 09:05:56 -0000 Received: from [212.227.126.207] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1A4cvx-0001kC-00 for tomcat-user@jakarta.apache.org; Wed, 01 Oct 2003 11:06:09 +0200 Received: from [80.128.17.244] (helo=cyberspaceroad.com) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1A4cvw-0006Ks-00 for tomcat-user@jakarta.apache.org; Wed, 01 Oct 2003 11:06:08 +0200 Message-ID: <3F7A98DB.3060000@cyberspaceroad.com> Date: Wed, 01 Oct 2003 11:05:31 +0200 From: Adam Hardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030917 X-Accept-Language: en, de-de, en-us MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Datasource connections not released when reloading context References: <40E9E4B9BEE4D211B62200A0CC3E01B0030BA5E6@rqiexch.resortquest.com> In-Reply-To: <40E9E4B9BEE4D211B62200A0CC3E01B0030BA5E6@rqiexch.resortquest.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Matt, you don't destroy them, you just close them. if (!conn.isClosed()) conn.close(); On 09/30/2003 12:51 AM Matt Raible wrote: > If I'm getting my database connections from a JNDI resource (configured in > server.xml) how do I destroy these suckers. Sample code would be great - or > tell me to RTFM. > > Matt > > -----Original Message----- > From: Phillip Qin [mailto:Phillip.Qin@shareowner.com] > Sent: Monday, September 29, 2003 8:04 AM > To: 'Tomcat Users List' > Subject: RE: Datasource connections not released when reloading context > > > - to release your DB connections when your app is shutdown or reloaded: > implement destroy method in your servlet class to close them. > - to prevent connections getting exhausted, use evictor if your use commons > pooling and dbcp. > > -----Original Message----- > From: Jose Alfonso Martinez [mailto:trilock@linuxcenter.com.mx] > Sent: September 27, 2003 7:31 PM > To: tomcat-user@jakarta.apache.org > Subject: Datasource connections not released when reloading context > > Hi guys, > > Does any one know if there is a possibility of tomcat, for any reason, to > reload a context without telling it to do so???? > > I am having a problem that after 2 or 3 days without reloading tomcat, > pooled-connections from the datasource get exahusted. > > The only case I have seen that the number of pooled-connections is > incremented is when I reloaded my context. In this case, the reloaded > context's datasource opened a new set of connections to work on (leaving the > older connections opened and not releasing them until tomcat is shutdown). > If the context gets reloaded over and over again, eventually connections > with the DBMS will get exahusted... > > Is that the expected behavior???? To leave conections open when reloading a > context???? > > Would there be another posibility for pooled-connections to get exahusted, > once they were set up and correctly running??? > > Thanks in advance > > Jose > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org