commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From T E Schmitz <mail...@numerixtechnology.de>
Subject Re: [Configuration] load config files from ddifferent jars
Date Mon, 09 Aug 2004 18:13:08 GMT
Hello Eric,

I'd be happy to make some contributions in return for the excellent 
libraries that Jakarta Commons is providing.
Once I have some time I'll have a look at it and familiarize myself with 
your code conventions.

Best regards,
Tarlika

Eric Pugh wrote:

> Humm..   Not sure on this one...   It seems like what we should be doing is
> actually loading them as a resources..  that way trying to find it is left
> up to whaterver classloader is being used..   so, it shouldn't care what jar
> it is in..  However, not quite sure how to do that..  patches welcome...!
> 
> I am sure you can do what you want, it seems not hard, but I'm not sure..
> Worse comes to worse, skip the configurationfactory, and just do it
> yourself..  but it would be nicer to just patch configurationFactory.
> 
> Eric
> 
> 
>>-----Original Message-----
>>From: T E Schmitz [mailto:mailreg@numerixtechnology.de]
>>Sent: Monday, August 09, 2004 6:07 PM
>>To: commons-user@jakarta.apache.org
>>Subject: [Configuration] load config files from ddifferent jars
>>
>>
>>Hello,
>>
>>I would like to set up a configuration factory specifying a properties
>>file which does not reside in the same jar as the composite
>>configuration .xml file.
>>
>>Example:
>>
>><configuration>
>>     <properties fileName="application.properties"/>
>>     <properties fileName="/biz/prop.properties"/>
>>     <hierarchicalDom4j fileName="objects/business-objects.xml"/>
>></configuration>
>>
>>It appears that the leading slash is stripped and an attempt is made to
>>read biz/prop.properties from the .jar file where above .xml config
>>resides.
>>
>>I notice there is a setBasePath() which would probably solve the problem
>>if all composite config files resides below the same basepath. But in my
>>case the various config files reside in different jar files.
>>
>>Is there a way of loading the various config files from different .jar
>>files?


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