commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jorge Ferrer" <jorge.fer...@gmail.com>
Subject Re: [Commons Configuration] idea
Date Thu, 08 Jun 2006 13:50:58 GMT
You maybe interested in taking a look at EasyConf which is build on
top of Commons Configuration and has a couple of features similar to
what you suggest:
- Property selectors (or filters) allow conditional property values.
For example:
skin[teacher]=blue
skin[student][secundary]=green
skin[student]=yellow
skin=grey
http://easyconf.sourceforge.net/user/properties/filters.html

- Multienvironment: allows having different properties for different
environments which can be selected by running the app with different
system properties:
http://easyconf.sourceforge.net/user/properties/multienvironments.html

Cheers,
Jorge

On 6/8/06, Tom <tbee@tbee.org> wrote:
> I have no idea if CC support this, but it's an FYI: I use a home made
> configuration class. The idea behind it is that some configuration items
> are relevant in a machine context (DB hostname?), others only for a user
> (GUI settings?), other in the combination of machine and user (home
> dir?), so this class automatically collects configuration based on the
> context it is running in. The context is determined by attributes, these
> attributes can be provided manually after instantiation, and some are
> set automatically. The class then tries to find configuration files in
> the classpath that match the current attributes.
>
> Say you have a machine name "compA", a user "userB", it searches for:
>
> configuration.properties
> configuration#system=compA#.properties
> configuration#user=userB#.properties
> configuration#system=compA#user=userB#.properties
>
> Of course the default prefix "configuration" can be altered to, for
> example, the application name.
>
> The biggest advantage is that it is possible to check the configuration
> files into the repository. When checking it out on another system, it
> automatically uses other configuration files, so there is no
> "configuration war". Naturally it has a monitoring thread to detect
> changes, allows chaining to make configuration even more flexible, etc.
>
> Just a FYI.
>
> Tom
>

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


Mime
View raw message