Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.PropertiesConfiguration


        CommTestUtils.killS4App(forkedConsumerNode);
    }

    private PropertiesConfiguration loadConfig() throws org.apache.commons.configuration.ConfigurationException,
            IOException {
        PropertiesConfiguration config = new PropertiesConfiguration();
        config.load(Resources.getResource("default.s4.core.properties").openStream());
        return config;
    }
View Full Code Here


    }

    @SuppressWarnings("serial")
    private void loadProperties(Binder binder) {
        try {
            config = new PropertiesConfiguration();
            config.load(commConfigInputStream);

            // TODO - validate properties.

            /* Make all properties injectable. Do we need this? */
 
View Full Code Here

 
  private UXFramework() {}
 
  public void setup(File setupFile) throws UXFrameworkException {
    try {
      configuration = new PropertiesConfiguration(setupFile);
    } catch (ConfigurationException e) {
      throw new UXFrameworkException(e);
    }
  }
View Full Code Here

     */
    public static void main(String[] args) throws ConfigurationException {
 
  String resource = "log.conf";
  org.apache.log4j.PropertyConfigurator.configure(resource);
  config = new PropertiesConfiguration("application.properties");
  ExecutorService exec = Executors.newCachedThreadPool();
  PictureHandler ph = new PictureHandler();
  mainF = new MainFormThread();
  exec.execute(mainF);
  exec.execute(ph);
View Full Code Here

        org.apache.log4j.PropertyConfigurator.configure("config/logging.properties");

        try {
            config = new CompositeConfiguration();
            config.addConfiguration(new SystemConfiguration());
            config.addConfiguration(new PropertiesConfiguration("config/server.properties"));

            final String data = config.getString("fileserver.data");
            final String services = config.getString("fileserver.services");
            final String logs = config.getString("fileserver.logs");
            final String archive = config.getString("fileserver.archive");
View Full Code Here

        VirtualHostConfiguration configuration;
        String configurationFile = (String)getAttribute(CONFIG_PATH);
        if (configurationFile == null)
        {
            final MyConfiguration basicConfiguration = new MyConfiguration();
            PropertiesConfiguration config = new PropertiesConfiguration();
            final String type = (String) getAttribute(TYPE);
            config.addProperty("type", type);
            VirtualHostFactory factory = VirtualHostFactory.FACTORIES.get(type);
            if(factory != null)
            {
                for(Map.Entry<String,Object> entry : factory.createVirtualHostConfiguration(this).entrySet())
                {
                    config.addProperty(entry.getKey(), entry.getValue());
                }
            }
            basicConfiguration.addConfiguration(config);

            CompositeConfiguration compositeConfiguration = new CompositeConfiguration();
View Full Code Here

  }};

  private ConfigReader() {}

  public static PropertiesConfiguration reloadConfiguration() {
    configuration = new PropertiesConfiguration() {{
      try {
        ConfigReader.class.getResourceAsStream("/config.properties");
      } catch (final Exception e) {
        log.error("加载配置文件失败", e);
      }
View Full Code Here

        // now need to perform the queue-topic-topics-queues magic.
        // So make a new ConfigurationObject that will hold all the configuration for this queue.
        ConfigurationPlugin queueConfig = new QueueConfiguration.QueueConfig();

        // Initialise the queue with any Global values we may have
        PropertiesConfiguration newQueueConfig = new PropertiesConfiguration();
        newQueueConfig.setProperty("name", queue.getName());

        try
        {
            //Set the queue name
            CompositeConfiguration mungedConf = new CompositeConfiguration();
View Full Code Here

    {
        super.setUp();

        String storePath = System.getProperty("QPID_WORK") + File.separator + getName();
       
        _config = new PropertiesConfiguration();
        _config.addProperty("store.class", getTestProfileMessageStoreClassName());
        _config.addProperty("store.environment-path", storePath);

        cleanup(new File(storePath));
View Full Code Here

  public synchronized void startup() throws Exception {
    LOG.info("Starting up cluster...");
    CompositeConfiguration config = new CompositeConfiguration();
    if (System.getProperty("config") != null) {
      config.addConfiguration(new PropertiesConfiguration(System.getProperty("config")));
    }
    config.addConfiguration(new PropertiesConfiguration(this.configResource));
    clusterSpec = ClusterSpec.withTemporaryKeys(config);
    controller = new ClusterController();

    cluster = controller.launchCluster(clusterSpec);
    proxy = new HadoopProxy(clusterSpec, cluster);
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.PropertiesConfiguration

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.