Hi,

Am 03.09.2011 07:59, schrieb Srinivas Jonnalagadda:
Hi,

Below is the code for i wrote and seems at the propsConfig object gets refreshd 
after the delay but the result object has the old values still. How do i get 
the new values into the result object after the refresh. I am trying to create 
a Configuration listener as well and that alos seems not to work.  The main 
objective for me is to get the properties object loaded with new values without 
JBOSS server restart. Any help is appreciated.


Regards,
Srinivas J

your code looks good, therefore I am not sure whether I fully understand your problem.

How can you tell that the properties configuration object is refreshed correctly when the result object still has the old values? Do you get other results if you access the configuration object directly, e.g. by calling propsConfig.getString("someKey") ? (If so, this would indicate a bug in the ConfigurationConverter.getProperties() implementation.)

Oliver


Properties result = null;
Configuration config = null;
URL resourceURL = null;
FileChangedReloadingStrategy refreshStrategy = new 
FileChangedReloadingStrategy();
refreshStrategy.setRefreshDelay(refreshDelay);

PropertiesConfiguration propsConfig = new PropertiesConfiguration();
propsConfig.setFileName(name);
propsConfig.load();
propsConfig.setReloadingStrategy(refreshStrategy);
result = ConfigurationConverter.getProperties(propsConfig);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to