commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom <t...@tbee.org>
Subject Re: How to use commons config in multiple VM environment
Date Thu, 25 Mar 2010 14:10:42 GMT

> Does anyone have best practices on how to unify the config, but still
> maintain flexibility for developers to test each process on its own in
> development lifer cycle?
>    

What works for us, is a configuration class which supports context 
dependent values, e.g.
   port=1234
   port[system|dev1]=4567

Or when using XML:
<port>1234</port>
<port system="dev1">4567</port>

This means that there are default values and more specific settings 
override the default / less specific.

Aside from specialized values, the class also searches for multiple 
configuration files. This is so production can have it settings (e.g. 
usernames and passwords) in separate files, so these do not need to be 
included in CVS/SVN/BZR/GIT/... for easy deployment.

Tom


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


Mime
View raw message