commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <sma...@lfjr.net>
Subject Re: [CONFIGURATION] ClassPropertiesConfiguration
Date Tue, 07 Dec 2004 12:41:55 GMT
Oliver Heger wrote:
> Locators would also be very useful for ConfigurationFactory to be used 
> in the definition files. This would imply an extensible means of 
> representing Locators as text, so you could write something like
> 
> <!-- classpath locator -->
> <properties locator="classpath:/myproperties"/>
> <!-- Custom locator -->
> <xml locator="my.package.MyLocator" params="..."/>
> 
> Just a quick shot, this needs to be further elaborated.

I would not add the locator alias in front of the resource name, that 
would look like an URL, but I like the idea. We could just add a locator 
attribute :

<properties locator="classpath" fileName="config.properties"/>


> Would it make sense to use Locators also for saving configurations? For 
> this purpose a locate() method would be needed that returns an 
> OutputStream.

I don't think so, the location mechanism is specific to the loading of 
the file, saving is a different beast, once the file has been loaded 
it's expected to be saved at the same place. That why I didn't want to 
remove the internal URL in AbstractFileConfiguration.

Emmanuel Bourg

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


Mime
View raw message