commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
Subject Re: FileReloading
Date Fri, 25 Mar 2005 00:02:52 GMT
Hello Miji, you can try this:

CompositeConfiguration config = (CompositeConfiguration) 
factory.getConfiguration();

for (int i = 0; i < config.getNumberOfConfigurations(); i++) {
     Configuration c = config.getConfiguration(i);
     if (c instanceof FileConfiguration) {
         ((FileConfiguration) c).setReloadingStrategy(new 
FileChangedReloadingStrategy());
     }
}

Emmanuel Bourg


Miji Mathews wrote:
> hi
> I am a little confused . I am using 
>  ConfigurationFactory factory = new ConfigurationFactory("config.xml");
>   Configuration config = factory.getConfiguration();
> 
> where config.xml looks like this 
> 
>   <configuration>
>  <system/>
>   <properties fileName="EOSystem.properties" />
>    <properties fileName="EOFacade.properties" />
>     <properties fileName="exceptions.properties" />
>    <xml fileName="test.xml"/>
>  </configuration>
> 
> 
> my problem is I want to use the reloading feature of Configuration
> with my CompositeConfiguration "config" object . Is there any way I
> can do it ? I dont know if this makes sense ?
> 
> 
> thanks
> 
> miji
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message