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.

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

Oliver

Emmanuel Bourg wrote:

Henning P. Schmiedehausen wrote:

I don't think, this is overengineered. Are you sure about URL locate?
I'd probably go for InputStream locate().


Is that for classloaders that do no support getRessource ? We really need to know where the file is located in order to reload it efficiently.

Hm. I probably would like this solution better than the current (which
reminds me of the way that commons-logging tries to find its log
APIs). We could use current as the default and make the others
pluggable. (and add a few C'tors which accept a Locator object)


We could either keep the current constructors and use the Locator directly :

new PropertiesConfiguration(locator.locate("config.properties));

or add one constructor :

new PropertiesConfiguration("config.properties", locator);

in this case we'll also need another load method :

config.load("config.properties", locator);


I think I prefer starting with the first solution.

Emmanuel Bourg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Dipl.-Inform. Oliver Heger
Zentrale Informationsverarbeitung (ZIV) / Bereich Anwenderverfahren
Klinikum der Philipps-Universit�t Marburg
Baldingerstra�e,
D-35037 Marburg
Tel: +49 6421 28-66923
mailto:[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to