commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CONFIGURATION-607) Provide the ability to programmatically specify config sources for ReloadingCombinedConfigurationBuilder
Date Tue, 01 Sep 2015 17:41:46 GMT

    [ https://issues.apache.org/jira/browse/CONFIGURATION-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14725751#comment-14725751
] 

Oliver Heger commented on CONFIGURATION-607:
--------------------------------------------

This is certainly a useful feature, and I also had thought about creating the definition for
the combined configuration dynamically.

As described in http://commons.apache.org/proper/commons-configuration/userguide/howto_combinedbuilder.html#Setting_up_a_CombinedConfigurationBuilder,
there is a hook which can be used to have more flexibility when defining the combined configuration:
a builder can be passed in that returns the configuration with the definition. We could provide
special builder implementations which construct such a definition configuration based on several
criteria, e.g. all files in a directory matching a specific pattern.

I am pretty convinced that this functionality can be added without incompatible changes in
the API. So it could be added after the 2.0 release; we could focus on getting 2.0 out first.

> Provide the ability to programmatically specify config sources for ReloadingCombinedConfigurationBuilder
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-607
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-607
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: File reloading
>    Affects Versions: 2.0
>            Reporter: Dzmitry Shylovich
>
> I have the following configuration files: 
> prop_test1.xml
> prop_test2.xml and so force.
> There is one default file - default.xml. 
> And I have to combine prop_test1.xml with default.xml  and get single combined configuration.
> prop_test2.xml with default.xml and get another combined configuration. 
> With current solution I have to specify a configuration definition file for every pair.
I think it will be nice to have the ability to programmatically specify files for ReloadingCombinedConfigurationBuilder.
> Something like:
> ReloadingCombinedConfigurationBuilder builder = new ReloadingCombinedConfigurationBuilder()
>     .configure(params.fileBased().addFile(new File("test1.xml").addFile(new File("default.xml")));



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message