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 35118] New: - Using FileChangedReloadingStrategy for XMLConfiguration
Date Mon, 30 May 2005 08:50: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=35118>.
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=35118

           Summary: Using FileChangedReloadingStrategy  for XMLConfiguration
           Product: Commons
           Version: 1.1 Final
          Platform: Other
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Configuration
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: raman.mishra@gmail.com


We are trying to use FileChangedReloadingStrategy for XMLConfiguration, but its 
not working. 

We are using CompositeConfiguration and we have properties files as well as 
some xml files. 

I set FileChangedReloadingStrategy for all the configuration which is sub  
class of FileConfiguration. But reloading is only working for properties.

Code:
============
Configuration config = null;

ConfigurationFactory factory = new ConfigurationFactory();
String configFile="c:/config.xml";

factory.setConfigurationFileName(configFile);
config = factory.getConfiguration();
CompositeConfiguration cc=((CompositeConfiguration)config);
int noOfConfig=cc.getNumberOfConfigurations();
for(int i=0;i<noOfConfig;i++){
System.out.println(cc.getConfiguration(i).getClass() +" : " + 
(cc.getConfiguration(i)  instanceof  FileConfiguration));
if((cc.getConfiguration(i)  instanceof  FileConfiguration)){
    ((FileConfiguration)cc.getConfiguration(i)).setReloadingStrategy(new 
FileChangedReloadingStrategy());
}

Is it possible to use FileChangedReloadingStrategy for xmlconfiguration.

-- 
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