Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 27333 invoked from network); 25 Jun 2003 13:37:23 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 25 Jun 2003 13:37:23 -0000 Received: (qmail 6357 invoked by uid 1304); 25 Jun 2003 13:37:23 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 25 Jun 2003 13:37:23 -0000 Date: Wed, 25 Jun 2003 06:37:23 -0700 (PDT) From: Rodney Waldhoff To: Jakarta Commons Users List Subject: Re: [DBCP] Testing of connections In-Reply-To: <3EF9A477.20600@lokitech.com> Message-ID: <20030625063347.Y4842@icarus.apache.org> References: <164942EC-A711-11D7-A981-003065672418@antwerpes.de> <3EF9A477.20600@lokitech.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, 25 Jun 2003, Serge Knystautas wrote: > Yes, the current release has only one validation query spot, which as > you say is during testOnBorrow. No. The current release, indeed the initial import of the source into commons, has one validation query and three places it can be used, independently or in combination. There are 8 possible combinations available--on borrow, on return, when idle, each independently on or off. > > This will still cause your firewall to kill connections, and then DBCP > will validate the connection, find it's bad, and get a good connection > for your app. (For me this is preferrable to keeping idle connections > open just because of a periodic validation check.) Independent of the validation/keep-alive query, you can tell the pool to evict connections that have been idle for too long. Set minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis. - Rod > > -- > Serge Knystautas > President > Lokitech >> software . strategy . design >> http://www.lokitech.com > p. 301.656.5501 > e. sergek@lokitech.com