From issues-return-5353-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Thu Sep 18 09:30:18 2008 Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 46474 invoked from network); 18 Sep 2008 09:30:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2008 09:30:15 -0000 Received: (qmail 29050 invoked by uid 500); 18 Sep 2008 09:30:04 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 28948 invoked by uid 500); 18 Sep 2008 09:30:04 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 28899 invoked by uid 99); 18 Sep 2008 09:30:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Sep 2008 02:30:04 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Sep 2008 09:29:13 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 60A36234C1D8 for ; Thu, 18 Sep 2008 02:29:46 -0700 (PDT) Message-ID: <504233524.1221730186394.JavaMail.jira@brutus> Date: Thu, 18 Sep 2008 02:29:46 -0700 (PDT) From: "Khawaja Shams (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (DBCP-274) DBCP Returns a closed connection even though testOnBorrow is set to true MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org DBCP Returns a closed connection even though testOnBorrow is set to true ------------------------------------------------------------------------ Key: DBCP-274 URL: https://issues.apache.org/jira/browse/DBCP-274 Project: Commons Dbcp Issue Type: Bug Affects Versions: 1.2.2 Reporter: Khawaja Shams Hello, I am using a BasicDataSource to acquire connections. The particular service that is facing the issue basically goes through periods of high activity followed by many hours of idle time. After long idle times, DBCP starts returning closed connections. I tried setting the testOnBorrow flag BEFORE any connections were acquired, but it has not helped the situation. One caveat is that I am not setting the validationQuery string. This is only because as far as I could tell, if the validationQuery is null, the pool will simply check if the connection is open. Please let me know if I can provide any more information. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.