Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 33803 invoked from network); 3 Jul 2010 01:26:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Jul 2010 01:26:54 -0000 Received: (qmail 54433 invoked by uid 500); 3 Jul 2010 01:26:54 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 54228 invoked by uid 500); 3 Jul 2010 01:26:53 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 54220 invoked by uid 99); 3 Jul 2010 01:26:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Jul 2010 01:26:53 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of phil.steitz@gmail.com designates 209.85.212.43 as permitted sender) Received: from [209.85.212.43] (HELO mail-vw0-f43.google.com) (209.85.212.43) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Jul 2010 01:26:44 +0000 Received: by vws4 with SMTP id 4so4129445vws.30 for ; Fri, 02 Jul 2010 18:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=0gEq8LL+nXQZJ+SjlkyJ3ftg9r4yY/IvOlDD/W2xIuY=; b=iz5XEIP5rleSg6SP+PmwEApX+PwhBO7iXZA0CisSD2nC/EgrOkyq8vZ+EK5EdTykwm n3WQVVQhjUCUORX8F3XyKFw3jgDEg7en0L0osYm91e2vFiQlKEB7d7fukZjqSAmlPRcT d8QfYj8bA869UZUgmThmydr2J2u0dYxi8l5IQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=Kp6zYNdtz4vhtX6nsjd+s/WDu37yTxKxzN0gLI+PxXYBx4jiEAWqaA5+aqewjXDzF0 L5PiHLtS1P4RJnUWWRYEAKUu6d14qJfqTsqH/76bNEEmkjxWwaNwMp2fXCQhkYH1ApD4 CrdKwp51WrwhzLSRxQNzw3pQ5AF3HYHDW3sXA= Received: by 10.220.158.9 with SMTP id d9mr811193vcx.249.1278120323292; Fri, 02 Jul 2010 18:25:23 -0700 (PDT) Received: from phil-steitzs-macbook-pro.local (c-76-99-90-51.hsd1.de.comcast.net [76.99.90.51]) by mx.google.com with ESMTPS id m6sm1500288vcx.0.2010.07.02.18.25.21 (version=SSLv3 cipher=RC4-MD5); Fri, 02 Jul 2010 18:25:22 -0700 (PDT) Message-ID: <4C2E917F.9080603@gmail.com> Date: Fri, 02 Jul 2010 21:25:19 -0400 From: Phil Steitz User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: Commons Developers List Subject: Re: [pool] deprecation of setFactory methods References: <4C28BEAC.9020909@gmail.com> In-Reply-To: <4C28BEAC.9020909@gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Phil Steitz wrote: > setFactory belongs to the top level ObjectPool and KeyedObjectPool > interfaces. I would like to deprecate these methods uniformly (to > be removed in pool 2.0) - removing them from the top level > interfaces and deprecating all implementations. There are two > reasons for this: > > 1. Good semantics for this method are hard to define. The interface > docs state only that the method may not always be supported and may > throw RTEs. GenericObjectPool throws IllegalStateException if the > method is invoked when there are borrowed objects out and destroys > all idle instances as a side effect when it succeeds. That is a > reasonable approach, but begs the question why not just clear the > existing pool and create a new one. It seems reasonable to me that > an invariant of an object pool should be instance homogeneity wrt > object factory. This is what GOP enforces. So why not just make > the factory immutable? > > 2. If the factory is mutable, threadsafety requires that access to > it be synchronized. Currently, we are inconsistent on this. Adding > synchronization to "fix" this would have significant performance > impacts. > > Before proceeding with wholesale deprecation, I would like to get > some feedback. In particular, I would like to make sure that there > are no valid use cases for setFactory applied to currently > implemented pools. Thanks in advance. Going once, going twice... Phil > > Phil > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org