You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mike Ferraro <mi...@harvard.edu> on 2006/02/22 15:42:59 UTC

[Configuration] thread-safe?

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?

-----
Mike Ferraro
Senior Software Engineer
CAIT : Information Technology Infrastructure Services
Harvard University
ph: 617-384-6683


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


Re: [Configuration] thread-safe?

Posted by Oliver Heger <he...@med.uni-marburg.de>.
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