You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Drasko Kokic <dr...@yahoo.com> on 2000/09/01 11:28:02 UTC

Re: [C2] ClassLoader issues

--- Robin Green <gr...@hotmail.com> wrote:
> Stefano Mazzocchi <st...@apache.org> wrote:
> >Robin Green wrote:
> > >
> > > Giacomo Pati <pa...@yahoo.com> wrote:
> > > >I've never understud why JSP is able to compile
> and load classes out of
> > > >WEB-INF/lib but XSP does not?
> > >
> > > Funny, I was racking my brains over this just
> today. Spooky!
> > >
> > > It's because XSP compiler gets the classpath
> from System.getProperty
> > > ("java.class.path") IIRC, and Tomcat doesn't
> change the system property 
> >to
> > > reflect its own internal classpath. Maybe that
> would be the solution - 
> >but
> > > I'm not sure whether mucking around with
> predefined system properties is
> > > allowed, safe or sensible.
> > >
> > > So I would suggest an addition to the Servlet
> API as a cleaner solution 
> >-
> > > and I know Stefano is/was on the Servlet expert
> group, so I'm not 
> >talking to
> > > thin air! :-)
> >
> >Please, give me more precisie indications of what
> you mean.
> 
> I mentioned this in another email on C-users: Maybe
> the Servlet API should 
> have a method to get a classpath from the servlet
> engine, which would be 
> useful e.g. for XSP compilation and XSP class loader
> purposes. Perhaps this 
> classpath would be a list of directories and jars on
> the local filesystem, 
> or perhaps it would be a list of URIs. Or maybe two
> methods, one for each 
> alternative. The file list would be more useful in
> the case of javac.
> 
> 

probably question for the tomcat-dev ... but, I could
not resist:
does tomcat create separate VM for each container, or
all the applications inside a specific tomacat
installation are run in a single VM?

thx


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Re: [C2] ClassLoader issues

Posted by "Pier P. Fumagalli" <pi...@eng.sun.com>.
Stefano Mazzocchi wrote:
> 
> [...]
> Each tomcat uses one and only one VM, but each "context" (there is no
> such thing as a "container") has (should have) it's own sandbox (with
> different classloader, security policies and such).
> 
> But I have no idea on how far this is implemented in current Tomcat, nor
> the timeline for such a thing to happen (ask them).

Catalina already uses separate classloader for WEB-APPs, and another
classloader for the servlet container itself (so that you cannot even
cast the javax.servlet.* objects to their actual implementation in
org.apache.*).

The only problems reladed to this topic are native libraries, wich are
always available throughout the whole VM (since they're handled by the
OS, not by classloaders, AFAIK), but it shouldn't be a really big
deal...

	Pier

Re: [C2] ClassLoader issues

Posted by Stefano Mazzocchi <st...@apache.org>.
Drasko Kokic wrote:
> 
> --- Robin Green <gr...@hotmail.com> wrote:
> > Stefano Mazzocchi <st...@apache.org> wrote:
> > >Robin Green wrote:
> > > >
> > > > Giacomo Pati <pa...@yahoo.com> wrote:
> > > > >I've never understud why JSP is able to compile
> > and load classes out of
> > > > >WEB-INF/lib but XSP does not?
> > > >
> > > > Funny, I was racking my brains over this just
> > today. Spooky!
> > > >
> > > > It's because XSP compiler gets the classpath
> > from System.getProperty
> > > > ("java.class.path") IIRC, and Tomcat doesn't
> > change the system property
> > >to
> > > > reflect its own internal classpath. Maybe that
> > would be the solution -
> > >but
> > > > I'm not sure whether mucking around with
> > predefined system properties is
> > > > allowed, safe or sensible.
> > > >
> > > > So I would suggest an addition to the Servlet
> > API as a cleaner solution
> > >-
> > > > and I know Stefano is/was on the Servlet expert
> > group, so I'm not
> > >talking to
> > > > thin air! :-)
> > >
> > >Please, give me more precisie indications of what
> > you mean.
> >
> > I mentioned this in another email on C-users: Maybe
> > the Servlet API should
> > have a method to get a classpath from the servlet
> > engine, which would be
> > useful e.g. for XSP compilation and XSP class loader
> > purposes. Perhaps this
> > classpath would be a list of directories and jars on
> > the local filesystem,
> > or perhaps it would be a list of URIs. Or maybe two
> > methods, one for each
> > alternative. The file list would be more useful in
> > the case of javac.
> >
> >
> 
> probably question for the tomcat-dev ... but, I could
> not resist:
> does tomcat create separate VM for each container, or
> all the applications inside a specific tomacat
> installation are run in a single VM?

Each tomcat uses one and only one VM, but each "context" (there is no
such thing as a "container") has (should have) it's own sandbox (with
different classloader, security policies and such).

But I have no idea on how far this is implemented in current Tomcat, nor
the timeline for such a thing to happen (ask them).

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------