Quoting Arved Sandstrom <[EMAIL PROTECTED]>:

> > -----Original Message-----
> > From: Andrius Sabanas [mailto:[EMAIL PROTECTED]
> > Sent: April 29, 2002 5:32 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Adding Fonts to userconfig...
> >
> > {SNIP]
> > Now I wonder if I am going to get a conflict between those two. This
> > design with static (magic) Options passing seems bizzare to me :-)
> > But as I understand, separate webapps get loaded by separate
> > classloaders, so is there any problem? Can anybody comment on this?
> 
> The Servlet 2.3 specification is the first servlet spec to really have much
> to say about classloaders; sections 3.7 and 9.7 in particular. Most of the
> items are recommendations, not definite requirements. (I consider "musts"
> and "shoulds" to be definite requirements). In any case, there is nothing
> in
> the spec that says that each web application gets its own classloader. In
> fact even if all "musts", "shoulds" and recommendations are satisfied you
> could still have one classloader for the servlet container and all
> web-apps;
> it's just that that single classloader has certain rules.
> 
> The situation is akin to that of loading application classes when invoking
> Java on the command line. You might have class A in each of 2 separate
> JARs,
> and also loose in yet another location, all three of which are in your
> classpath. Do you expect each location to be serviced by its own
> classloader? No, likely not.
> 
> It may be that the Tomcat reference implementation has separate
> classloaders
> for each webapp. If so, this would be a signal to other servlet container
> authors that even if that is not required (or suggested) by the spec, that
> it's a good idea. But in the interests of portability I wouldn't rely on
> this.
> 
> I think we are trying to fix things up in terms of use of statics. I want
> to
> point out that when Fop was begun that there was no idea that people would
> want to run the thing inside a servlet; it was meant to be a command-line
> processor that ran in its own JVM and produced PDF files.

I don't normally reply to my own posts but I wanted to add a couple of comments:

1) I was being very pedantic in my above comments. I sometimes get irritated 
with specifications that aren't written clearly in spots, and in this case I 
was being very nitpicky.

2) In fact Tomcat does have separate classloaders for each web-app and this is 
a safe assumption to make in practise. I imagine that all other recent or 
decent servlet containers operate the same way.

3) It's hard work to write a spec. I've had to write a few myself. :-)

Regards,
AHS

-------------------------------------------------
  This mail sent through Chebucto Community Net
           http://www.chebucto.ns.ca/

Reply via email to