You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Glenn Nielsen <gl...@voyager.apg.more.net> on 2002/02/25 19:41:54 UTC

Tomcat 4.1-dev WebappClassLoader and common/endorsed

I was wondering why the WebappClassLoader has the common/endorsed
directory support in it.

I can understand why the build and catalina.sh might have support
for it, but not WebappClassloader.

According to the following, replacement of endorsed standard
API's is done by the JVM.

http://java.sun.com/j2se/1.4/docs/guide/standards/index.html

Regards,

Glenn

----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.1-dev WebappClassLoader and common/endorsed

Posted by Glenn Nielsen <gl...@voyager.apg.more.net>.
"Craig R. McClanahan" wrote:
> 
> On Mon, 25 Feb 2002, Glenn Nielsen wrote:
> 
> > Date: Mon, 25 Feb 2002 14:13:37 -0600
> > From: Glenn Nielsen <gl...@voyager.apg.more.net>
> > Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> > To: Tomcat Developers List <to...@jakarta.apache.org>
> > Subject: Re: Tomcat 4.1-dev WebappClassLoader and common/endorsed
> >
> > Ooops, I misspoke, it isn't in WebappClassLoader.  Look at the code in
> > Boostrap.java, it is adding jar's located in common/endorsed to the classloader.
> >
> > But catalina.sh (via setclasspath.sh) is adding those same jars
> > to the JVM via the -Djava.endorsed.dirs property.
> >
> 
> On a 1.4 system, the fact that the JAR files in common/endorsed are in the
> common classloader will get bypassed due to the usual class loader
> delegation policy.
> 
> On a 1.3 system (that doesn't recognize "java.endorsed.dirs"), we still
> need the parser to be visible in the common classloader so that the
> previous behavior is maintained.
> 

Ok, that makes sense.  Perhaps BootStrap.java should only add the
contents of common/endorsed to the ClassLoader it creates if the
JVM version is < 1.4.

Thanks,

Glenn

----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.1-dev WebappClassLoader and common/endorsed

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 25 Feb 2002, Glenn Nielsen wrote:

> Date: Mon, 25 Feb 2002 14:13:37 -0600
> From: Glenn Nielsen <gl...@voyager.apg.more.net>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: Tomcat Developers List <to...@jakarta.apache.org>
> Subject: Re: Tomcat 4.1-dev WebappClassLoader and common/endorsed
>
> Ooops, I misspoke, it isn't in WebappClassLoader.  Look at the code in
> Boostrap.java, it is adding jar's located in common/endorsed to the classloader.
>
> But catalina.sh (via setclasspath.sh) is adding those same jars
> to the JVM via the -Djava.endorsed.dirs property.
>

On a 1.4 system, the fact that the JAR files in common/endorsed are in the
common classloader will get bypassed due to the usual class loader
delegation policy.

On a 1.3 system (that doesn't recognize "java.endorsed.dirs"), we still
need the parser to be visible in the common classloader so that the
previous behavior is maintained.


> Glenn
>

Craig


> Remy Maucherat wrote:
> >
> > > I was wondering why the WebappClassLoader has the common/endorsed
> > > directory support in it.
> >
> > ?
> > I don't understand what you're talking about here; the WCL doesn't have
> > anything to do with endorsed or common.
> > Right now, it (finally) complies with the spec, plus it has a very targetted
> > class filter (to avoid classcasts on JNDI and the JAXP base classes).
> >
> > > I can understand why the build and catalina.sh might have support
> > > for it, but not WebappClassloader.
> > >
> > > According to the following, replacement of endorsed standard
> > > API's is done by the JVM.
> > >
> > > http://java.sun.com/j2se/1.4/docs/guide/standards/index.html
> >
> > Remy
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
>
> --
> ----------------------------------------------------------------------
> Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
> MOREnet System Programming               |  * if iz ina coment.      |
> Missouri Research and Education Network  |  */                       |
> ----------------------------------------------------------------------
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.1-dev WebappClassLoader and common/endorsed

Posted by Glenn Nielsen <gl...@voyager.apg.more.net>.
Ooops, I misspoke, it isn't in WebappClassLoader.  Look at the code in 
Boostrap.java, it is adding jar's located in common/endorsed to the classloader.

But catalina.sh (via setclasspath.sh) is adding those same jars
to the JVM via the -Djava.endorsed.dirs property.

Glenn

Remy Maucherat wrote:
> 
> > I was wondering why the WebappClassLoader has the common/endorsed
> > directory support in it.
> 
> ?
> I don't understand what you're talking about here; the WCL doesn't have
> anything to do with endorsed or common.
> Right now, it (finally) complies with the spec, plus it has a very targetted
> class filter (to avoid classcasts on JNDI and the JAXP base classes).
> 
> > I can understand why the build and catalina.sh might have support
> > for it, but not WebappClassloader.
> >
> > According to the following, replacement of endorsed standard
> > API's is done by the JVM.
> >
> > http://java.sun.com/j2se/1.4/docs/guide/standards/index.html
> 
> Remy
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.1-dev WebappClassLoader and common/endorsed

Posted by Remy Maucherat <re...@apache.org>.
> I was wondering why the WebappClassLoader has the common/endorsed
> directory support in it.

?
I don't understand what you're talking about here; the WCL doesn't have
anything to do with endorsed or common.
Right now, it (finally) complies with the spec, plus it has a very targetted
class filter (to avoid classcasts on JNDI and the JAXP base classes).

> I can understand why the build and catalina.sh might have support
> for it, but not WebappClassloader.
>
> According to the following, replacement of endorsed standard
> API's is done by the JVM.
>
> http://java.sun.com/j2se/1.4/docs/guide/standards/index.html

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>