First, thanks for contributing this. I was hoping something like this was possible? <configuration> <jndi prefix="java:comp/env"/ refreshDelay="[milliseconds]"> <properties fileName="conf/test.properties"/> <dom4j fileName="conf/test.xml"/ refreshDelay="[millseconds]"> </configuration>
> -----Original Message----- > From: Eric Galluzzo [mailto:[EMAIL PROTECTED] > Sent: Monday, December 15, 2003 12:28 PM > To: Jakarta Commons Developers List > Subject: Re: [configuration] Automatic reloading > > > Emmanuel Bourg wrote: > > > I wonder if it is desirable to change the PropertiesConfiguration > > class or extend it as a ReloadablePropertiesConfiguration class. What > > would be the best approach ? Also the same feature could be > > implemented for the DOM4JConfiguration class. If so we might want to > > introduce a ReloadableConfiguration interface defining the > > is/setAutoReload and get/setRefreshDelay methods. > > Alternatively, it might be nice to introduce a FileConfiguration > interface that just has a java.io.File getFile() method. Both > DOM4JConfiguration and PropertiesConfiguration would implement this. > Then one could repackage your existing ReloadablePropertiesConfiguration > as a ReloadableConfiguration that implements Configuration but delegates > to another FileConfiguration and checks the file every so often. Thus: > > Configuration config = new ReloadableConfiguration( > new DOM4JConfiguration( myXMLFile ) ); > > or > > Configuration config = new ReloadableConfiguration( > new PropertiesConfiguration( myPropFile ) ); > > This is a Decorator design reminiscent of FilteredOutputStream and > FilteredInputStream. > > - Eric > > > > --------------------------------------------------------------------- > 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]
