Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 85531 invoked from network); 2 Apr 2002 16:04:08 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Apr 2002 16:04:08 -0000 Received: (qmail 26738 invoked by uid 97); 2 Apr 2002 16:04:08 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 26722 invoked by uid 97); 2 Apr 2002 16:04:07 -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 26711 invoked from network); 2 Apr 2002 16:04:07 -0000 From: "Anjan" To: Subject: [DBCP] : DelegatingConnection/PoolableConnection Bug ? Date: Tue, 2 Apr 2002 08:03:56 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-Mimeole: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal 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 been using DBCP with mySQL and Oracle using DriverManagerConnectionFactory, StackObjectPool and KeyedObjectPoolFactory. I use the code like follows : I am getting an exception from PoolableConnection (saying that the Connection is already closed) when I call a sequence like this ==================== conn.close(); .. .. if (conn.isClosed()) { conn.close(); // THROWS EXCEPTION } I found that the method DelegatingConnection.isClosed() is delegating it to the underlying driver (mySQL)-- where connection state is open (since the Connection was only returned to the pool). close() is obviously not delegated to the underlying driver. Am I missing something here -- it appears that this functionality should have been tested by the user base by now ? Should we be intercepting the isClosed() at PoolableConnection() instead of letting DelegatingConnection handle it ? I'm currently eating the exception -- but believe that this should be fixed. Can work on a fix if I get a suitable suggestion. Thanks very much, ANJAN. B -- To unsubscribe, e-mail: For additional commands, e-mail: