Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 05D03197C6 for ; Thu, 7 Apr 2016 21:55:26 +0000 (UTC) Received: (qmail 59974 invoked by uid 500); 7 Apr 2016 21:55:25 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 59885 invoked by uid 500); 7 Apr 2016 21:55:25 -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 59874 invoked by uid 99); 7 Apr 2016 21:55:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2016 21:55:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6C1922C1F58 for ; Thu, 7 Apr 2016 21:55:25 +0000 (UTC) Date: Thu, 7 Apr 2016 21:55:25 +0000 (UTC) From: "Gary Gregory (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DBCP-458) Allow subclasses of BasicDataSource to provide their own GenericObjectPool implementation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DBCP-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15231163#comment-15231163 ] Gary Gregory commented on DBCP-458: ----------------------------------- Patches with unit tests are welcome ! ;-) > Allow subclasses of BasicDataSource to provide their own GenericObjectPool implementation > ----------------------------------------------------------------------------------------- > > Key: DBCP-458 > URL: https://issues.apache.org/jira/browse/DBCP-458 > Project: Commons Dbcp > Issue Type: Improvement > Affects Versions: 2.1.1 > Reporter: Adrian Tarau > > I had the same need in an older version and I had to do a terrible hack which I would not like to do with a newer version. > The main idea is that I would like to be able to monitor borrow and return events (among other things) and for that I need to provide my own GenericObjectPool implementation. > It would be a small change to add a createObjectPool method and use it in createConnectionPool. Default implementation would be to > {code} > if (abandonedConfig != null && > (abandonedConfig.getRemoveAbandonedOnBorrow() || > abandonedConfig.getRemoveAbandonedOnMaintenance())) { > gop = new GenericObjectPool<>(factory, config, abandonedConfig); > } > else { > gop = new GenericObjectPool<>(factory, config); > } > {code} > Subclasses would have the flexibility to provide their own pool implementation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)