You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2007/04/26 00:46:16 UTC

[jira] Updated: (CONFIGURATION-62) [configuration] Using FileChangedReloadingStrategy for XMLConfiguration

     [ https://issues.apache.org/jira/browse/CONFIGURATION-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bourg updated CONFIGURATION-62:
----------------------------------------

    Fix Version/s: 1.2

> [configuration] Using FileChangedReloadingStrategy for XMLConfiguration
> -----------------------------------------------------------------------
>
>                 Key: CONFIGURATION-62
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-62
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.1
>         Environment: Operating System: Windows 2000
> Platform: Other
>            Reporter: Raman
>             Fix For: 1.2
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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