Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AFDF09157 for ; Thu, 19 Apr 2012 05:52:45 +0000 (UTC) Received: (qmail 19526 invoked by uid 500); 19 Apr 2012 05:52:44 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 19085 invoked by uid 500); 19 Apr 2012 05:52:39 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 19056 invoked by uid 99); 19 Apr 2012 05:52:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2012 05:52:38 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.17.10] (HELO moutng.kundenserver.de) (212.227.17.10) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2012 05:52:32 +0000 Received: from [192.168.178.20] (dslb-088-069-196-183.pools.arcor-ip.net [88.69.196.183]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0Lsi1h-1S9MTi0E6z-012HC5; Thu, 19 Apr 2012 07:52:11 +0200 Message-ID: <4F8FA80A.1060607@oliver-heger.de> Date: Thu, 19 Apr 2012 07:52:10 +0200 From: Oliver Heger User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: Commons Users List Subject: Re: synchronization and XMLPropertiesConfiguration References: <4F8F18AF.4030402@oliver-heger.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:2fyjp21Hc0rfLeO94q0N4Zy87HOIZFE7kGT+xuMfz9r Gl2526DvWSULtgHUJaQa9JVchIWaHyR1KPdFc8VQRArRA13SL4 oxS35lXi9W08uQWWg0diX28YUQMsvvOyNHKTZ8kXtYbse7ZOPr 0HJGEhHV2oFj6hDyLR5RcHBZZttMwphhl0UDHAjrOQovl2485d PQat8Xac63SAJzDJBYHIgHgec6oEp0WzEnQ5JWB29/4EmHKdXp mE2R7/QdzIaberKVMuQF4rXpx2FwKDJgHy9NgpPsPOyieAQS6i 0XOoIr9S/ZqmsmOZTA7zmSadEydDaG9yps8wrVdLHvytGXZYH6 AekfiMZiH9ltwbmk/oRo= X-Virus-Checked: Checked by ClamAV on apache.org Am 18.04.2012 23:35, schrieb Julien Wajsberg: > Hi Olivier, > > On 18 April 2012 21:40, Oliver Heger wrote: >>> >>> As I understand it, modifying the object means changing one of its >>> core values, like the file to load from/save to, the encoding, etc. It >>> doesn't mean adding or setting a property. Is that true ? >> >> >> No, the configuration's properties are also affected. Internally, they are >> stored in node-like structures which are not synchronized against concurrent >> access. Therefore concurrent modifications can have unexpected results. > > However, it seems like setProperty is synchronized with the reloadLock as well ? > (see http://grepcode.com/file/repo1.maven.org/maven2/commons-configuration/commons-configuration/1.8/org/apache/commons/configuration/AbstractFileConfiguration.java#AbstractFileConfiguration.setProperty%28java.lang.String%2Cjava.lang.Object%29) > > Am I missing something ? You are right. Originally access to properties was not thread-safe. Later on changes have been made to support concurrent access, so my information is not up-to-date. However, I was not the author, and I am not sure whether really all access paths are synchronized. Oliver > > Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org