Have you checked out: http://jakarta.apache.org/turbine/fulcrum/fulcrum-configuration/index.html..
There is a component that if you have a container gives you the singleton.. or just cache it.. that is what Turbine does.. Turbine.java has a static Configuration and you just do Turbine.getConfiguration() wherever you need it... Eric > -----Original Message----- > From: Michael MATTOX [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 07, 2004 3:33 AM > To: 'Jakarta Commons Users List' > Cc: [EMAIL PROTECTED]; Keith Kee > Subject: RE: [Configuration] Caching properties > > > > That is actually what we are doing here. However, the drawback is > > that since > > the properties are cached, changes to the configuration file with not be > > read in with new values. You can use the namespaces to read a > > subset of the > > configurations to reduce the runtime cost, however, apparently the > > configuration is not capable of reading nested namespace. > > My idea was to add code to this Singleton for refreshing, with two > possibilities: watching the property file to see if it changes, > or having a > JMX command to make a refresh. The first should be pretty simple. > > For synchronizing, my properties will be used for config data and will not > be changed by the application. So I don't see any synchronization issues. > > Regards, > Michael > > > -- > This E-mail is confidential. It may also be legally privileged. > If you are > not the addressee you may not copy, forward, disclose or use any > part of it. > If you have received this message in error, please delete it and > all copies > from your system and notify the sender immediately by return E-mail. > Internet communications cannot be guaranteed to be timely, > secure, error or > virus-free. The sender does not accept liability for any errors > or omissions. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
