commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Crouch" <>
Subject [configuration] thread-safe?
Date Fri, 31 Oct 2003 02:25:39 GMT

I'm looking to use the configuration package and wanted to wrap it in my own 
Singleton e.g.
MyConfiguration.getInstance().getProperty(key). The ConfigurationFactory, 
referencing various Properties files, would get setup in the constructor of 

If I do not intend to add properties at run time, is it ok to use 
MyConfiguration in a mutli-threaded environment, i.e. once the 
ConfigurationFactory has been loaded up, is it safe for multiple threads to 
retrieve properties at the same time.

I'd really appreciate some advice if the Singleton pattern is not the 
recommend approach. I'm trying to  centralise where the Configuration is 
setup and also trying to ensure that the Properties files would only get 
read in once, rather than each call to retrieve a property.

Thanks in advance

Sign-up for a FREE BT Broadband connection today!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message