Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 17781 invoked from network); 13 Oct 2010 19:51:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Oct 2010 19:51:44 -0000 Received: (qmail 90093 invoked by uid 500); 13 Oct 2010 19:51:43 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 89983 invoked by uid 500); 13 Oct 2010 19:51:43 -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 89975 invoked by uid 99); 13 Oct 2010 19:51:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 19:51:43 +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 simone.tripodi@gmail.com designates 74.125.82.171 as permitted sender) Received: from [74.125.82.171] (HELO mail-wy0-f171.google.com) (74.125.82.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 19:51:37 +0000 Received: by wyb36 with SMTP id 36so102433wyb.30 for ; Wed, 13 Oct 2010 12:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=20AcJhL708+7gOspIdsTetU0BimwEwL+CNFfYhdqqD8=; b=qXz4owN6jGaL/aJ4dluZwbB/MsKFkCxZrwsoZ2gohC8bQqVxoJAHBnH4f0GZVL5QEj oTJqhtGqJd1079MDdxFYd0PLasD3oF+a5lVvYX0Qt90duaNouMJvglPWwfnRM1zzHtlC Q1e7IGXF0RH1k2RnfhIMaHPcBMpvGk6tXfBYI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=BS4XFqDeo1TVqpGb29J4nUHABu0vCjwzE8ki6xnbOa+6qn9MuxYcpr4M4v3BvlENPO 5Kv7BjaodSkeC+nywkBjDH+zj8FyXE5QE3wJ/1PdAVz9/u4ofout0akHt/R5Sgc4+Bg/ 8Zl55k7N9jiT8OUM3NF+AnN9RiR02eElrwxFY= MIME-Version: 1.0 Received: by 10.216.138.65 with SMTP id z43mr1297268wei.12.1286999476643; Wed, 13 Oct 2010 12:51:16 -0700 (PDT) Received: by 10.216.36.195 with HTTP; Wed, 13 Oct 2010 12:51:16 -0700 (PDT) In-Reply-To: References: <20101013173240.809502388A1C@eris.apache.org> Date: Wed, 13 Oct 2010 21:51:16 +0200 Message-ID: Subject: Re: svn commit: r1022205 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java From: Simone Tripodi To: Commons Developers List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I agree. Maybe we don't need to make *Factory synchronized, but just pool i= mpls. How does it sound? Simo http://people.apache.org/~simonetripodi/ http://www.99soft.org/ On Wed, Oct 13, 2010 at 8:45 PM, sebb wrote: > On 13 October 2010 18:32, =C2=A0 wrote: >> Author: simonetripodi >> Date: Wed Oct 13 17:32:37 2010 >> New Revision: 1022205 >> >> URL: http://svn.apache.org/viewvc?rev=3D1022205&view=3Drev >> Log: >> fixed deprecated properties direct access >> added missing setters >> syncronized mutable properties (s|g)etters > > I think createPool also needs to be synchronised, as it references the > various mutable fields. > Alternatively, could make them all volatile. > > Otherwise if one thread sets the value and another calls createPool, > the second thread might not see the latest value. > > But perhaps the PoolFactory class does not need to be thread-safe at > all, in which case the synch. can be dropped? > > At present it appears to be thread-safe, but it is only conditionally > thread-safe. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org