commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34289] - [configuration] FileChangedReloadingStrategy fails to properly detect file change
Date Mon, 04 Apr 2005 15:32:20 GMT
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 eric.lee@genworth.com  2005-04-04 17:32 -------
Setting the strategy on the configuration instead of setting the configuration 
on the strategy solves Sample #2, but does not solve Sample #1 (properties 
file location is determined by searching the classpath).

===========================================================================
PropertiesConfiguration propConfig = new PropertiesConfiguration
("commons.properties");
FileChangedReloadingStrategy strategy = new FileChangedReloadingStrategy();

strategy.setConfiguration(propConfig);
strategy.setRefreshDelay(500);
strategy.init();

propConfig.setReloadingStrategy(strategy);

for (;;){
	String prop1 = propConfig.getString("prop1");
	System.out.println(Calendar.getInstance().getTime() + " : " + 
strategy.reloadingRequired() + " : " + 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message