Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 49074 invoked from network); 9 Jun 2002 17:23:26 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Jun 2002 17:23:26 -0000 Received: (qmail 16244 invoked by uid 97); 9 Jun 2002 17:23:29 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 16199 invoked by uid 97); 9 Jun 2002 17:23:28 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 16187 invoked by uid 98); 9 Jun 2002 17:23:27 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) X-Authentication-Warning: bryan.netmeme.org: bryan set sender to bryan_lists@netmeme.org using -f Subject: Re: DBCP validation query: how to use? From: Bryan Field-Elliot To: Jakarta Commons Developers List In-Reply-To: <006b01c20fbf$a7f1d850$0111010a@user> References: <1023597546.8804.4.camel@bryan.netmeme.org> <004101c20f88$1b77f350$0111010a@user> <1023630278.18052.2.camel@bryan.netmeme.org> <006b01c20fbf$a7f1d850$0111010a@user> Content-Type: multipart/alternative; boundary="=-nG3zimbeWSl/0TSyVVNm" X-Mailer: Ximian Evolution 1.0.6.99 Date: 09 Jun 2002 11:24:01 -0600 Message-Id: <1023643441.19481.1.camel@bryan.netmeme.org> Mime-Version: 1.0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --=-nG3zimbeWSl/0TSyVVNm Content-Type: text/plain Content-Transfer-Encoding: 7bit That's the missing link, thank you! On my GenericObjectPool I have to call setTestOnBorrow(true) right after creating it. I assumed (obviously incorrectly) that if my PoolableConnectionFactory had a validationQuery, then it would complete the plumbing in the other parts of the system as necessary to make it work. But evidently not. This was tricky and should be documented better. Thank you! Bryan On Sun, 2002-06-09 at 08:12, Juozas Baliuka wrote: It is code in GenericObjectPool. "_testOnBorrow" must be set to true. Sorry, but I dont know how to set it in DBCP, I believe somebody more competent will respond to your message. .......................... if( _testOnBorrow && !_factory.validateObject(pair.value)) { try { _factory.passivateObject(pair.value); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(pair.value); } else { ............................................. --=-nG3zimbeWSl/0TSyVVNm--