Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 26789 invoked from network); 26 Sep 2000 16:13:06 -0000 Received: from upright.cs.princeton.edu (root@128.112.136.7) by locus.apache.org with SMTP; 26 Sep 2000 16:13:06 -0000 Received: from gentoo.CS.Princeton.EDU (IDENT:root@gentoo [128.112.169.41]) by upright.CS.Princeton.EDU (8.10.2/8.10.2) with ESMTP id e8QG8QQ19402; Tue, 26 Sep 2000 12:08:26 -0400 (EDT) Received: from localhost by gentoo.CS.Princeton.EDU (8.9.3) id MAA14301; Tue, 26 Sep 2000 12:08:39 -0400 Date: Tue, 26 Sep 2000 12:08:39 -0400 (EDT) From: Aaron Mulder X-Sender: ammulder@gentoo.CS.Princeton.EDU To: tomcat-dev@jakarta.apache.org cc: cocoon-dev@xml.apache.org Subject: Re: re loading of classes in tomcat 3.2b4 is _sloooooow_@6 In-Reply-To: <39CFF2AA.8D474DD7@eng.sun.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N On Mon, 25 Sep 2000, Craig R. McClanahan wrote: > The third advantage is that some libraries will not work correctly unless they > are installed in the webapp. I believe Cocoon has run into this -- I'll > describe what I ran into with Struts because it's similar. > > Struts includes a module called Digester (very similar to the XmlMapper that is > used inside Tomcat to configure itself from the server.xml and web.xml files). > One of the things you can do is create a new object when a particular XML > element is encountered. But, if the digester classes are loaded from the > system class path, and the Java class of the object you're trying to create is > in the webapp (a very typical case), you're out of luck -- > ClassNotFoundException because the Digester tries to use the classloader it was > itself loaded from (i.e. system class loader). This can be solved by judicious use of the Thread.contextClassLoader under 1.2. Of course, the library has to support that, but Tomcat should already: under 3.2 at least there's the Jdk12Interceptor that would set the contextClassLoader for all calls - I assume 4.0 has something similar. Aaron