tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: common/endorsed & classLoader
Date Thu, 19 Aug 2004 07:01:10 GMT
Bill Barker wrote:

> 
>>>>Are endorsed jars getting loaded somewhere else other than Bootstrap?
>>>
>>>Using the default startup scripts, they are loaded into the System CL
> 
> (the
> 
>>>only way a delegating CL can find them :).
>>
>>You mean -Djava.endorsed.dirs in catalina scripts, correct?
>>
> 
> 
> Yup.
> 
> 
>>BTW, why do they need to be loaded into the System CL in the scripts on
> 
> top
> 
>>of commonLoader in Bootstrap using common.loader property in
>>org/apache/catalina/startup/catalina.properties?
>>
> 
> 
> CLFactory sets delegate=true on the StandardCL instances, so they are
> delegating loaders (This is in 5.0.x; in 5.5 StandardCL is pretty much just
> a URLCL, which delegates).  As a result, they will always find the xml
> classes in the System CL (for JVM >= 1.4).  Thus if you want to change your
> xml classes from the JVM default, that's where you have to have them.  It
> doesn't really matter if they are in the common.loader property or not
> (except, of course, for JVM < 1.4 :).

To make things a bit more interesting, I believe there are some checks 
in JDK1.4 to prevent you to override rt.jar classes. That's what 
"endorsed" really does, allow you to bypass those checks.

I don't think we managed to get xerces and jaxp to load from a 
classloader even with delegation disabled.


Costin





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message