"Caldarale, Charles R" <chuck.caldar...@unisys.com> wrote on 06/16/2010
09:55:19 PM:

> > From: peter_f...@blm.gov [mailto:peter_f...@blm.gov]
> > Subject: Re: Tomcat 6.0 documentation: is classloading description
> > correct?
> >
> > The docs say in one place that the order is one way (WebApp
> > first, then Boot, System and Common, which is as I'd expect)
>
> Please document where it says that; make sure not to ignore the
> sentence: "There are exceptions."  Also, don't assume that the
> complete list of exceptions is described in that paragraph rather
> than the bulleted list.

The exceptions it gives are the ones I'd expect - no overriding JRE
classes, servlet classes ignored, use of the endorsed override mechanism.
I'm really more interested in the non-exceptional case of simply loading my
application classes and those from third-party jars such as Apache Commons
packages.

>
> > I need confirmation that that second part of the documentation
> > is in error (or not, of course).
>
> All parts of the classloader doc appear to be correct to me, also
> confirmed by a quick glance at the code.

I don't see how that can be the case:

"When a request to load a class from the web application's WebappX class
loader is processed, this class loader will look in the local repositories
first, instead of delegating before looking ... All other class loaders in
Tomcat 6 follow the usual delegation pattern."

But then it says, this, which describes a different search order:

Bootstrap classes of your JVM
System class loader classes (described above)
/WEB-INF/classes of your web application
/WEB-INF/lib/*.jar of your web application
$CATALINA_HOME/lib
$CATALINA_HOME/lib/*.jar

They can't *both* be right.

--Pete

>
> You might want to look at the API spec for the class of interest:
> http://tomcat.apache.org/tomcat-6.0-
> doc/api/org/apache/catalina/loader/WebappClassLoader.html
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
> PROPRIETARY MATERIAL and is thus for use only by the intended
> recipient. If you received this in error, please contact the sender
> and delete the e-mail and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


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

Reply via email to