commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <heg...@med.uni-marburg.de>
Subject Re: [Configuration] includes in PropertiesConfiguration / classloader case
Date Wed, 11 May 2005 07:57:34 GMT
Stefan Rufer wrote:
> 
> On Wed, 11 May 2005, Oliver Heger wrote:
> 
>> However this whole include stuff was made a bit obsolete by 
>> ConfigurationFactory and the possibility of defining multiple 
>> configuration sources in a configuration definition file, which are 
>> collected and added to a CompositeConfiguration. Wouldn't this be an 
>> alternative for you?
> 
> 
> Hmm, not quite. For a bigger development team we are setting up a JUnit 
> part that provides pre-configured TestCases. As different developers may 
> have different configs, the idea is to implement a dynamic overloading 
> mechanism for properties:
> 
> 1st Prio  USERNAME.properties
> 2nd Prio  junit.properties
> 3rd Prio  default.properties
> 
> This is hard to do with a configuration definition file: As a user 
> should be able to override properties by _just_ adding it's 
> USERNAME.properties file, we can't foresee these entries in the config 
> def file (don't want all these usernames in there). Therefore we 
> dynamically build up our configuration inside the code using a 
> CompositeConfiguration.
> 
> And: The include possibility is cool, I really like this, it provides 
> flexibility!
> 
> I had a quick look at the code but was not able to submit a patch right 
> now. Hope to find the time :-)
> 
> 
> Stefan
> 

Stefan,

if you send a patch, I will be glad to review and commit it. You are 
welcome!

Here is another idea for a solution for now: ConfigurationFactory is 
able to locate files in the user's home directory. So if you include an 
optional configuration file, say user.properties, different files can be 
loaded depending on the logged in user. Don't know if this is suitable 
for your scenario.

Oliver

---------------------------------------------------------------------
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