Oh yes there was a Solution#3
Avalon hides org.xml.sax classes in a leaf classloader just for itself. Any blocks
wanting XML
parsing are free to provide their own implementations.
Hmmm, that wouldn't help those that wanted to share the central xml parsing resources.
Err,
stretching my knowledge here, but perhaps they could avail of the "central xml
resources aware BAR
cloassloader".
There was a nice diagram for Tomcat 4.0 somewhere that illustrated the perils of
classloading when
sub apps could be loaded (in tomcat's case WAR files).
Regards,
- Paul H
--- Paul Hammant <[EMAIL PROTECTED]> wrote: > Background :
> ============
>
> I'm porting Batik to Jesktop. It's 99% finshed and quite a whopper of an
>application.
>
> Problem :
> =========
>
> Included in Batik is org.xml.sax classes. The factory tries to dynamically load a
>parser.
> Batik
> wants crimson (crimson-parser.jar). Avalon already has org.xml.sax in classpath, so
>classloader
> uses the factory from the one with Avalon, not the classes loaded by a different
>(leaf)
> classloader for Batik in Jesktop in Avalon. Of course that's right (security), but
>wrong becase
> the top level, Avalon, classloader knows nothing of the leaf classloader and it's
>clearly
> visible
> crimson jar.
>
> Solution #1
> ===========
>
> Talk to the poeple at www.xml.org and get them to add a classloader param to the
> XMLReaderFactory.createXMLReader() method. Same trick as used for Repository
>(talked of
> recently)
>
> Solution #2
> ===========
>
> Delete org.xml from my fork of Batik, place crimson-parser in pheonix's libs
>directory.
>
> Summary
> =======
>
> Naturely I opted for solution #2, but it feels hacky. I'll email David Megginson
>(Mr SAX).
>
> Incidentally, the classes are marked as...
>
> // NO WARRANTY! This class is in the Public Domain.
>
> ... which surely means that all GPL cannot import it ;-)
>
> Regards,
>
> -PH
>
>
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]