2011/7/29 Rainer Jung <rainer.j...@kippdata.de>:
> In theory we still support splitted server / common /shared class
> loaders. But providing classes via the server loader does not work out
> of the box. E.g. I remember some TC 6 situation in 2009 where someone
> wanted to provide a special listener and put it into the server loader
> and *not* into the common loader. But that lead to a CNFE, because
> "org.apache.catalina.core.StandardServer" was loaded by the common
> loader. To fix it, he had to reorder the Jars in the old TC 5.5 layout
> including splitting up Jars combined for TC 6 into one file into
> separate Jars for server and common.
>
> Does anyone actually use the server loader? By default server and shared
> loaders delegate everything to the common loader, because their search
> path is empty. If there is no known use case for the server loader we
> might as well remove it at least for TC 8.
>
> Should we document how to use the server loader (minimum Jar
> rearrangement) or is this unwanted, because server is kind of deprecated?
>
> I guess we should still keep shared, because although it is generally
> not recommended I can at least imagine how to use it. But for "server" I
> have some doubts.
>

I think that it is possible to document Server classloader, but one
should clearly state that it is deprecated for a reason:

One should read and understand ClassLoader HOWTO and be able to deal
with dependencies mess.  Having to move some jars around is a
reasonable price for that. (I do not want to list what jars those
are).

BTW,
1) IIRC, using privileged="true" in Context will make it to use the
server classloader
2) One has to update catalina.policy if that is used.


I think I'll update class-loader-howto.html soon, because I see some
typos/ glitches there.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to