On Sat, 23 Jun 2001 [EMAIL PROTECTED] wrote:

> Hi David,
> 
> Thanks for this report, I'm impressed on your deep understanding of the
> subject. Class loading is one of the most difficult areas, and until Nacho
> implemented most of the new loader scheme we had lots of problems. ( that
> happened few months ago ).
> 
> > Here's the list of things that I consider to be broken, based on the
> > understandings that: 
> > 
> > 
> >   A) the hierarchy should go: 
> > 
> >            SystemCL
> >               |                 <-- LAYER 1
> >           lib/common CL
> >            /     \              <-- LAYER 2
> >   lib/container lib/apps CL
> >                    |            <-- LAYER 3
> >                  WEB-INF/lib       << same CL, but with URLs
> >                  WEB-INF/classes      from both dirs, in this
> >                                       order...
> 
> You are absolutely right, that's the intended hierarchy. 
> 

One thing you might want to note for the future is that, in servlet 2.3,
the order of loading in the web-app classloader is specified to be
reversed from this (i.e. WEB-INF/classes first, then WEB-INF/lib).  The
new spec also permits a web-app classloader to override classes in parent
classloaders by using a "look then delegate" policy, rather than "delegate
than look" in the usual Java2 fashion.  (Tomcat 4's classloaders do both
of these things, against a very similar overall hierarchy.)

Neither of these behaviors is specified for 2.2, so you're pretty much
free to do what you want.  But you should think about implementing similar
policies now, to improve the portability of apps to containers supporting
2.3.

> 
> Costin
> 

Craig


Reply via email to