Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 89110 invoked from network); 17 Jan 2002 21:33:41 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 17 Jan 2002 21:33:41 -0000 Received: (qmail 3351 invoked by uid 97); 17 Jan 2002 21:33:44 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 3335 invoked by uid 97); 17 Jan 2002 21:33:44 -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 3324 invoked from network); 17 Jan 2002 21:33:43 -0000 Message-Id: <5.1.0.14.0.20020117142859.026e5d60@interobjective.com> X-Sender: james@interobjective.com@interobjective.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 17 Jan 2002 14:33:10 -0700 To: "Jakarta Commons Developers List" From: James House Subject: [DBCP] possible correction for PoolingDataSource Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - thunder2.cwihosting.com X-AntiAbuse: Original Domain - jakarta.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [0 0] X-AntiAbuse: Sender Address Domain - interobjective.com X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, I have a proposed correction for the class PoolingDataSource.java change this method: public synchronized Connection getConnection() throws SQLException { return (Connection)(_pool.borrowObject()); } to be like this: public synchronized Connection getConnection() throws SQLException { try { return (Connection)(_pool.borrowObject()); } catch(NoSuchElementException nsee) { throw new SQLException("No connection available in pool."); } } This enables code to handle the exception thrown when there is an exhausted pool in the same manor as if the connection is invalid. Comments/Thoughts? James -- To unsubscribe, e-mail: For additional commands, e-mail: