Quoting Emmanuel Bourg <[EMAIL PROTECTED]>:

> Greetings, I'd like to contribute a slight modification to reload 
> automatically a PropertiesConfiguration if the underlying .properties 
> file has been changed. I had to implement this to prevent restarting my 
> web application every time a configuration file is modified.
> 
> The auto reload mode is enabled by calling setAutoReload(true) on the 
> PropertiesConfiguration instance. It's disabled by default. Every time a 
> property is accessed with getXXX(key) the date of the file is checked 
> and the configuration is reloaded if the previous date known is older. 
> This check is executed only once every 5 seconds to prevent hammering 
> the file system.
> 
> I'm attaching the patch and the modified files to this mail, all test 
> cases passed successfully. I've also added a specific test case for the 
> automatic reloading scenario.
> 
> Emmanuel Bourg
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to