Package org.apache.commons.configuration.reloading

Examples of org.apache.commons.configuration.reloading.FileChangedReloadingStrategy


    public Config() throws ConfigurationException {
        this.configuration = new HierarchicalINIConfiguration(Config.class
                .getClassLoader().getResource(CONFIG_FILE));
        this.configuration
                .setReloadingStrategy(new FileChangedReloadingStrategy());
    }
View Full Code Here


                FileConfiguration fConfigure =
                    (FileConfiguration)_Configure.getConfiguration(i);
                // �ˮֲպA�]�w����W�٬O�_����
                if (map.containsKey(fConfigure.getFileName())) {
                    String fName = fConfigure.getFileName();
                    FileChangedReloadingStrategy reloadStrategy =
                        new FileChangedReloadingStrategy();
                    reloadStrategy.setRefreshDelay(((Long)map.get(fName)).longValue());
                    fConfigure.setReloadingStrategy(reloadStrategy);
                }
            }
        }
    }
View Full Code Here

    private void reloadConfiguration(final File file) throws ConfigurationException {
        log.debug("createConfiguration " + file.exists());
        log.debug("createConfiguration.... " + file.getAbsolutePath());
        XMLConfigurationFileSupport.xmlConfiguration = new XMLConfiguration(file);
        XMLConfigurationFileSupport.xmlConfiguration.setAutoSave(true);
        XMLConfigurationFileSupport.xmlConfiguration.setReloadingStrategy(new FileChangedReloadingStrategy());
    }
View Full Code Here

         }
         catch (org.apache.commons.configuration.ConfigurationException e)
         {
            throw new ConfigurationException(e);
         }
         projectLocalConfig.setReloadingStrategy(new FileChangedReloadingStrategy());
         projectLocalConfig.setAutoSave(true);

         ConfigurationAdapter adapter = BeanManagerUtils.getContextualInstance(bm, ConfigurationAdapter.class,
                  new ConfigAdapterQualifierLiteral());
         adapter.setParent(projectConfig);
View Full Code Here

         }
         catch (org.apache.commons.configuration.ConfigurationException e)
         {
            throw new ConfigurationException(e);
         }
         globalXml.setReloadingStrategy(new FileChangedReloadingStrategy());
         globalXml.setAutoSave(true);

         ConfigurationAdapter adapter = BeanManagerUtils.getContextualInstance(bm, ConfigurationAdapter.class,
                  new ConfigAdapterQualifierLiteral());
         adapter.setDelegate(globalXml);
View Full Code Here

        PropertiesConfiguration configuration;

        try {
            configuration = new PropertiesConfiguration(eanPropertiesFileName);
            configuration.setReloadingStrategy(new FileChangedReloadingStrategy());
        } catch (ConfigurationException ce) {
            if (LOG.isWarnEnabled()) {
                LOG.warn(String.format(NO_EAN_PROPERTIES_FOUND_MESSAGE, eanPropertiesFileName));
            }
            configuration = new PropertiesConfiguration();
View Full Code Here

   {
      try
      {
         XMLConfiguration commonsConfig = new XMLConfiguration(file);
         commonsConfig.setEncoding("UTF-8");
         commonsConfig.setReloadingStrategy(new FileChangedReloadingStrategy());
         commonsConfig.setAutoSave(true);
         return new ConfigurationAdapter().setDelegate(commonsConfig);
      }
      catch (org.apache.commons.configuration.ConfigurationException e)
      {
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.reloading.FileChangedReloadingStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.