DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=34289>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34289 ------- Additional Comments From [EMAIL PROTECTED] 2005-04-04 19:24 ------- The strategy is already initialized by the configuration when setReloadingStrategy is called, you don't need to call strategy.setConfiguration() nor strategy.init(). Also I don't think this is the best example to test the strategy. Since the call to getString() will generate a call to reloadingPerformed() if the file changed, calling reloadingRequired() after that will return "false" most of the time, unless the file changed between the two instructions. So I suggest you try this instead: PropertiesConfiguration config= new PropertiesConfiguration("commons.properties"); FileChangedReloadingStrategy strategy = new FileChangedReloadingStrategy(); strategy.setRefreshDelay(500); config.setReloadingStrategy(strategy); for (;;){ System.out.println((new Date()) + " : " + strategy.reloadingRequired() + " : " + config.getString("prop1")); Thread.sleep(1000); } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
