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] ConfigurationFactory resources from classpath/jar.
Date Tue, 12 Apr 2005 05:58:51 GMT
Pete,

version 1.1 of commons-configuration already supports loading 
configuration files from the classpath. More information about this 
subject is available here:
http://jakarta.apache.org/commons/configuration/howto_properties.html
(in the section called "Loading").

Oliver

Pete Cain wrote:
> Hi,
> 
> What I'm aiming to do is use commons-configuration to load a bunch of
> configuration data from with in a jar that forms my default
> configuration and then load anything runtime modified configurations
> afterwards.
> 
> My problems so far have been with loading configurations as resources
> from the class path.  To do this I have customized the digester rules
> use by ConfigurationFactory to give me a <properties-as-resource> tag.
>  The digester rule specifies a class that extends
> PropertiesConfiguration and overrides load(String fileName) so that
> the file name is always loaded using getClass().getResource(String). 
> I have found this approach to work so far.
> 
> What I'd like to know is, am I on the right track with this ? 
> Considering I've only just started investigating commons-configuration
> are there any problems I could run into in using the approach ?
> 
> Thanks in advance
> 
> Pete
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 


-- 
Dipl.-Inform. Oliver Heger
Zentrale Informationsverarbeitung (ZIV) / Bereich Anwenderverfahren
Klinikum der Philipps-Universit├Ąt Marburg
Baldingerstra├če,
D-35037 Marburg
Tel: +49 6421 28-66679
mailto:oliver.heger@med.uni-marburg.de

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