Hi Oliver, Before I create a bug I wanted to describe the problem in a little more detail. The reason is that I am not sure if it is a bug or designed that way. From what I see when tracing the code in a debugger the way it is designed a reload can never occur for a CombinedConfiguration for my case. In my case the property and xml files which make up my configuration can be modified outside of my application. Because they are modified outside my application a ConfigurationEvent is not triggered.
When I tried the same tests using a CompositeConfiguration requiresReload() is called when getProperty() is invoked. The class CombinedConfiguration extends HierarchicalConfiguration. The logic which tests for a reload is implemented in AbstractHierachicalFileConfiguration, which is not part of the CombinedConfiguration hierarchy. The getProperty() of HierarchicalConfiguration does not use the delegate pattern or check for reloadingRequired(). So, after this long winded explanation I am not sure if I am using a CombinedConfiguration in the way it was intended. If you still think this is a bug I will create the bug in Jira. Thanks in advance, Tom DeBruycker On 11/29/06, Oliver Heger <[EMAIL PROTECTED] > wrote:
Thomas DeBruycker wrote: > Hi, > > I have a question about using the CombinedConfiguration with the > FileChangedReloadingStrategy. For my test case I have a configuration XML > file that contains one property file and two XML files. Each file in the > configuration XML file specifies a FileChangedReloadingStrategy. The > problem that I am seeing is the the files are not reloaded when they are > modified. When I tried this with a CompositeConfiguration the files were > reloaded as I had expected. > > My questions are: > 1) Should the CombinedConfiguration reload automatically if it's > configuration files change? > 2) Is it up to the user of the CombinedConfiguration to test if a reload is > required and then call DefaultConfigurationBuilder.getConfiguration (false) > to force the reload? > > Thanks in advance, > Tom DeBruycker > What you describe sounds like a bug. Regarding reloads CombinedConfiguration should behave like CompositeConfiguration. Can you open a bug report in JIRA [1] and attach your test case? I will have a look. Thanks Oliver [1] http://jakarta.apache.org/commons/configuration/issue-tracking.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
