commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <heg...@med.uni-marburg.de>
Subject Re: [Configuration] thread-safe?
Date Wed, 22 Feb 2006 15:12:42 GMT
Mike Ferraro wrote:
> I apologize if this question has been answered, but couldn't seem to
> find a search function for the mailing list archives.
> 
> Can anyone tell me if the Commons Configuration tools are thread safe?
> Specifically, I would like to maintain a global CompositeConfiguration
> within a web application that contains several FileConfigurations with
> active reload strategies.  I want to make sure that there aren't any
> collisions when seperate threads are attempting to access properties on
> the same configuration, especially during a reload.
> 
> Any idea if this is built in, or do I have to worry about doing this
> myself?
> 

Read only access to a Configuration object should be thread-safe. This 
also includes reloading activities (during a reload operation an 
explicit lock is hold).

However if some of your threads update the configuration, you are 
responsible for synchronization yourself.

HTH
Oliver

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


Mime
View raw message