You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by "Anatole Tresch (JIRA)" <ji...@apache.org> on 2016/09/11 16:12:20 UTC

[jira] [Comment Edited] (TAMAYA-165) Support of multiple configuration files out of the box

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

Anatole Tresch edited comment on TAMAYA-165 at 9/11/16 4:11 PM:
----------------------------------------------------------------

The problem is that scanning the classpath for arbitrary resources is not a trivial thing (see resources module). I see the following options:
* define a default fvile location, e.g. ./config for reading xml and properties files. The location can be customized by setting a system property on startup. This is simple since, scanning a folder on the FS is easy.
* We define an additional meta-entry in {{javaconfiguration.properties}} to include additional files on the same archive, e.g.
{noformat}
/META-INF/javaconfiguration.properties:
-----------------------------------------------------
includes=foo.properties,/config/myprops.properties,file:c:/temp/test.properties
{noformat}

Basically this requirement leads us to the same feature I proposed as META-CONFIGURTION (Tamaya-145). In the upcoming Oracle Java EE config proposal a XML based metaconfiguration format is likely to come, so we may also leverage that one, once it is more clearly defined.


was (Author: anatole):
The problem is that scanning the classpath for arbitrary resources is not a trivial thing (see resources module). I see the following options:
* define a default fvile location, e.g. ./config for reading xml and properties files. The location can be customized by setting a system property on startup. This is simple since, scanning a folder on the FS is easy.
* We define an additional meta-entry in {{javaconfiguration.properties}} to include additional files on the same archive, e.g.
{noformat}
/META-INF/javaconfiguration.properties:
-----------------------------------------------------
includes=foo.properties,/config/myprops.properties,file:c:/temp/test.properties
{noformat}

Basically this requirement leads us to the same feature I proposed as META-CONFIGURTION. In the upcoming Oracle Java EE config proposal a XML based metaconfiguration format is likely to come, so we may also leverage that one, once it is more clearly defined.

> Support of multiple configuration files out of the box
> ------------------------------------------------------
>
>                 Key: TAMAYA-165
>                 URL: https://issues.apache.org/jira/browse/TAMAYA-165
>             Project: Tamaya
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.2-incubating
>            Reporter: Oliver B. Fischer
>             Fix For: 0.3-incubating
>
>
> In its default configuration Tamaya reads all its configuration properties from {{META-INF/javaconfiguration.properties}}. This is fine if you have not so many different configuration properties. But if you have a lot of them this file gets quite large.
> Therefore we should consider to provide an easy way to support more then one configuration file per archive without providing any additional code from the user side.



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