Hi..

I think, and Emmanuel, can you verify for me, that we need to change the
ConfigurationFactory to use the new file locating stuff?  Right now I think
the problem is that in ConfigurationFactory.FileConfigurationFactory, the
logic for finding a file sucks..  I think the whole basePath is wrong..

Antonio, if you could send in a unit test demonstrating this, that would
really help verify that any changes we make solve your problem.

Eric

> -----Original Message-----
> From: Antonio Fiol Bonnin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 23, 2004 8:48 PM
> To: Jakarta Commons Users List
> Subject: [configuration] How to load from a resource (as opposed to a
> file)
>
>
> Hi,
>
> <configuration>
>    <hierarchicalDom4j fileName="someFile.xml" />
> </configuration>
>
> looks for someFile.xml in the same place as the containing xml. Looks
> good... unless the containing XML is a resource.
>
> Possibly due to a bug on ClassLoader implementation in both Tomcat and
> IBM WAS, if the containing file is in a jar file in WEB-INF/lib, and
> someFile.xml is in the same package (to make it simpler) in
> WEB-INF/classes/package/name, the file is not properly loaded, for
> different reasons in each App server.
>
> So the question is: Can I state something like...
> filename="resource:package/name/someFile.xml" that would ultimately
> resolve to the right file in the right place?
>
> Do I have an alternative other than translating the XML into code that
> creates the right Configuration objects (in a CompositeConfiguration),
> but giving each the right URL I got from Class.getResource(String) ?
>
> Thank you very much.
>
>
> Antonio Fiol
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to