commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Wajsberg <fel...@gmail.com>
Subject Re: synchronization and XMLPropertiesConfiguration
Date Wed, 18 Apr 2012 21:35:01 GMT
Hi Olivier,

On 18 April 2012 21:40, Oliver Heger <oliver.heger@oliver-heger.de> 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 ?

Thanks
-- 
Julien

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message