Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 25114 invoked from network); 4 Apr 2007 22:49:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Apr 2007 22:49:55 -0000 Received: (qmail 74230 invoked by uid 500); 4 Apr 2007 22:49:49 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 74216 invoked by uid 500); 4 Apr 2007 22:49:49 -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 74205 invoked by uid 99); 4 Apr 2007 22:49:49 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 15:49:49 -0700 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=MAILTO_TO_SPAM_ADDR X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [72.22.94.67] (HELO virtual.halosg.com) (72.22.94.67) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 15:49:41 -0700 Received: (qmail 12278 invoked from network); 4 Apr 2007 17:44:09 -0500 Received: from unknown (HELO ?198.18.100.87?) (65.91.105.194) by halosg.com with SMTP; 4 Apr 2007 17:44:09 -0500 Message-ID: <46142B4E.6040701@hanik.com> Date: Wed, 04 Apr 2007 16:48:46 -0600 From: Filip Hanik - Dev Lists User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: connection pool References: <8F65B045E4D866468CB6B8337E8130F10904A4@CHEXV1.CHBOSTON.ORG> <2c8c9b200704020936u7e67385ahb611b792f1a825b9@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Martin Gainty wrote: > 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 > yeah, the problem with this is that the algorithm for the "abandoned" connections is quite fishy, you'll pretty much have to reach max connections before any abandoned removal is done. but yes, that is what you need, also set logAbandoned="true" so that you can get some info where your "leak" is Filip > > > 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 >>> >>> >> > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.446 / Virus Database: 268.18.25/744 - Release Date: 4/3/2007 5:32 AM > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org