Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 5971 invoked from network); 20 Oct 2010 22:46:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Oct 2010 22:46:46 -0000 Received: (qmail 44722 invoked by uid 500); 20 Oct 2010 22:46:45 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 44574 invoked by uid 500); 20 Oct 2010 22:46:45 -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 44310 invoked by uid 99); 20 Oct 2010 22:46:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Oct 2010 22:46:45 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Oct 2010 22:46:44 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9KMkNO7005231 for ; Wed, 20 Oct 2010 22:46:24 GMT Message-ID: <26352761.21191287614783615.JavaMail.jira@thor> Date: Wed, 20 Oct 2010 18:46:23 -0400 (EDT) From: "Gary Gregory (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (POOL-173) Better config without duplication. In-Reply-To: <12479977.20601287612865678.JavaMail.jira@thor> 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/POOL-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Gregory updated POOL-173: ------------------------------ Attachment: (was: pool2config.diff) > Better config without duplication. > ---------------------------------- > > Key: POOL-173 > URL: https://issues.apache.org/jira/browse/POOL-173 > Project: Commons Pool > Issue Type: Improvement > Reporter: Gary Gregory > Priority: Minor > Fix For: 2.0 > > Attachments: pool2config.diff > > > There is code duplication in configuration code. > I'd like to track an experiment here. > > -----Original Message----- > > From: Gary Gregory [mailto:GGregory@seagullsoftware.com] > > Sent: Wednesday, October 20, 2010 10:44 > > To: Commons Developers List > > Subject: RE: [pool] Reusing Config > > > > In the same department, I see the following ivars: > > > > lifo : boolean > > maxActive : int > > maxIdle : int > > maxTotal : int > > maxWait : long > > minEvictableIdleTimeMillis : long > > minIdle : int > > numTestsPerEvictionRun : int > > testOnBorrow : boolean > > testOnReturn : boolean > > testWhileIdle : boolean > > timeBetweenEvictionRunsMillis : long > > whenExhaustedAction : WhenExhaustedAction > > > > defined in four classes: > > > > GenericKeyedObjectPool > > GenericKeyedObjectPoolFactory > > GenericObjectPool > > GenericObjectPoolFactory > > > > Which feels to me like a missed opportunity to avoid duplication. > > > > Is making one ivar private or final or volatile be applied to all four > > classes? > > > > We could: > > > > Use a config object instead of the 13 ivars. > > Or a common superclass then we can consider if it should hold the ivar list or > > a Config object. > > > > Would it be too weird to have a common super class for BaseObjectPool and > > BasePoolableObjectFactory for example? > > > > Gary Gregory > > Senior Software Engineer > > Rocket Software > > 3340 Peachtree Road, Suite 820 . Atlanta, GA 30326 . USA > > Tel: +1.404.760.1560 > > Email: ggregory@seagullsoftware.com > > Web: seagull.rocketsoftware.com > > > > > > > > > -----Original Message----- > > > From: Gary Gregory [mailto:GGregory@seagullsoftware.com] > > > Sent: Wednesday, October 20, 2010 10:29 > > > To: Commons Developers List > > > Subject: [pool] Reusing Config > > > > > > Hi All: > > > > > > I think this came up recently. Any thoughts or plans on extracting the > > Config > > > class out of GenericKeyedObjectPool and GenericObjectPool so it can be > > reused. > > > The constants for default values could then also be moved to Config. > > > Gary Gregory > > > Senior Software Engineer > > > Rocket Software > > > 3340 Peachtree Road, Suite 820 * Atlanta, GA 30326 * USA > > > Tel: +1.404.760.1560 > > > Email: ggregory@seagullsoftware.com > > > Web: seagull.rocketsoftware.com > > > > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.