Hi Chris,

On Sat, Aug 28, 2010 at 1:12 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Stefan,
>
> On 8/27/2010 7:34 AM, Chefo wrote:
> > thanks for the interest - of course I'll give you an example.
> Surprisingly
> > it is not java.lang.Object that I'm trying to hide but the stax api in
> java
> > 6. I need to do so because of the notorious fault in the
> > XMLOutputFactory#newInstance(String, ClassLoader).
>
> Interesting.
>
> Why not simply put your replacement STAX into the system's endorsed
> libraries? Wouldn't that fix pretty much everything, and require much
> less work?
>

Anathema!
Messing with the endorsed libs is strongly discouraged (and considered
heresy) around here. Otherwise yeah - that was my first thought also.


>
> > The thing is that osgi runtime in which the catalina lives complicates
> the
> > class loading a bit.
> > Note that this black voodoo magic for configuring restricted system
> packages
> > is not something I've invented - I just saw there is such thing in jetty
> and
> > was extremely happy to see it could be implemented with little effort in
> > tomcat as well.
>
> Jetty is OSS... can you steal their ClassLoader implementation?
>

Hey I sense some negative connotation here - I got the idea from there. I'm
extending the catalina webapp class loader (basically adding 5-6 lines of
code) and it has nothing in common with jetty src.

>
> I highly recommend Rainer's suggestion of writing a loader to configure
> your ClassLoader, rather than trying to get the ClassLoader to configure
> itself (always tricky).
>
> Good luck, and let us know how it goes.
>

Sure already followed Rainer's advice - worked perfectly fine.
Thanks again for all the help guys.


>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkx4OGAACgkQ9CaO5/Lv0PD+TACeOVU9e2L41rqdmZ8pRx/DIktv
> Rh0An1OC5U/ZXarXx7e2xEAwt7DPyB5+
> =BvEJ
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
Best regards,
chefo

Reply via email to