Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 34867 invoked from network); 3 Apr 2007 19:36:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Apr 2007 19:36:39 -0000 Received: (qmail 30448 invoked by uid 500); 3 Apr 2007 19:36:32 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 30428 invoked by uid 500); 3 Apr 2007 19:36:32 -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 30417 invoked by uid 99); 3 Apr 2007 19:36:32 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2007 12:36:32 -0700 X-ASF-Spam-Status: No, hits=3.3 required=10.0 tests=EXTRA_MPART_TYPE,MAILTO_TO_SPAM_ADDR,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mgainty@hotmail.com designates 65.54.246.105 as permitted sender) Received: from [65.54.246.105] (HELO bay0-omc1-s33.bay0.hotmail.com) (65.54.246.105) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2007 12:36:23 -0700 Received: from hotmail.com ([65.55.138.14]) by bay0-omc1-s33.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Tue, 3 Apr 2007 12:36:03 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 3 Apr 2007 12:36:02 -0700 Message-ID: Received: from 24.63.77.77 by BAY133-DAV4.phx.gbl with DAV; Tue, 03 Apr 2007 19:36:00 +0000 X-Originating-IP: [24.63.77.77] X-Originating-Email: [mgainty@hotmail.com] X-Sender: mgainty@hotmail.com From: "Martin Gainty" To: "Tomcat Users List" References: <8F65B045E4D866468CB6B8337E8130F10904A4@CHEXV1.CHBOSTON.ORG> <2c8c9b200704020936u7e67385ahb611b792f1a825b9@mail.gmail.com> Subject: Re: connection pool Date: Tue, 3 Apr 2007 15:28:36 -0400 MIME-Version: 1.0 Content-Type: multipart/related; type="text/plain"; boundary="----=_NextPart_000_0523_01C77604.BF979E80" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-OriginalArrivalTime: 03 Apr 2007 19:36:02.0972 (UTC) FILETIME=[50800DC0:01C77627] X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_0523_01C77604.BF979E80 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit MG-- You want to make sure your abandoned connections are properly re-cycled e.g. To configure a DBCP DataSource so that abandoned dB connections are removed and recycled add the following paramater to the ResourceParams configuration for your DBCP DataSource Resource: removeAbandoned true http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html MG -- ----- Original Message ----- From: "Daniel Stephens" To: "Tomcat Users List" Sent: Monday, April 02, 2007 12:36 PM Subject: Re: connection pool > sorry if someone has already mentioned this, but you will probably have to > add the testOnborrow Parameter. So that also means you have to use the > ValidationQuery, etc... but it(the pool) should try to restablish a > connection at that point. > > testOnBorrow will cause some more overhead, but it might resolve your > problem. > > here's an example.. > > > factory > org.apache.commons.dbcp.BasicDataSourceFactory > > > driverClassName > oracle.jdbc.driver.OracleDriver > > > url > jdbc:oracle:thin:@:: > > > username > john > > > password > doe > > > maxActive > 5 > > > maxIdle > 5 > > > maxWait > -1 > > > removeAbandoned > true > > > validationQuery > select count(*) from dual > > > testOnBorrow > true > > > On 3/19/07, Gioia, Michael wrote: >> >> Hi, I'm new to tomcat and have a problem with keeping up the connection >> to the database thru the connection pool. >> >> >> >> Almost every weekend the database gets bumped and the java app that were >> running needs to have tomcat restarted to reconnect to the database thru >> the connection pool. When we come in on Monday tomcat and the database >> are up and running, but the app will not connect to the database. >> >> >> >> Is there a way to reestablish the connection so our users don't have to >> wait until we come in on Monday to restart tomcat? >> >> >> >> Many Thanks, >> >> MG >> >> > ------=_NextPart_000_0523_01C77604.BF979E80--