Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 8216 invoked from network); 1 Sep 2006 13:55:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2006 13:55:18 -0000 Received: (qmail 40733 invoked by uid 500); 1 Sep 2006 13:55:13 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 40697 invoked by uid 500); 1 Sep 2006 13:55:13 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 40686 invoked by uid 500); 1 Sep 2006 13:55:13 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 40683 invoked by uid 99); 1 Sep 2006 13:55:13 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2006 06:55:13 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2006 06:55:12 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 397481A981A; Fri, 1 Sep 2006 06:54:52 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r439322 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina: core/StandardContext.java startup/ContextRuleSet.java Date: Fri, 01 Sep 2006 13:54:51 -0000 To: tomcat-dev@jakarta.apache.org From: remm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060901135452.397481A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: remm Date: Fri Sep 1 06:54:50 2006 New Revision: 439322 URL: http://svn.apache.org/viewvc?rev=439322&view=rev Log: - Revert the fix, since the situation described in the bug is not valid (and I'm afraid my boss would murder me if there's a regression). - Cleanup getParentCL so that it returns consistent results when using privileged="true". This might have been causing problems in some cases. - After looking a bit everywhere, the CreateLoaderRule will use the same parent CL as the one which would be set by the CopyParentCL rule, so I don't see how a problem could occur. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextRuleSet.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?rev=439322&r1=439321&r2=439322&view=diff ============================================================================== --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Fri Sep 1 06:54:50 2006 @@ -1423,6 +1423,23 @@ /** + * Return the parent class loader (if any) for this web application. + * This call is meaningful only after a Loader has + * been configured. + */ + public ClassLoader getParentClassLoader() { + if (parentClassLoader != null) + return (parentClassLoader); + if (getPrivileged()) { + return this.getClass().getClassLoader(); + } else if (parent != null) { + return (parent.getParentClassLoader()); + } + return (ClassLoader.getSystemClassLoader()); + } + + + /** * Return the context path for this Context. */ public String getPath() { @@ -4035,17 +4052,7 @@ } if (getLoader() == null) { - ClassLoader parent = null; - if (getPrivileged()) { - if (log.isDebugEnabled()) - log.debug("Configuring privileged default Loader"); - parent = this.getClass().getClassLoader(); - } else { - if (log.isDebugEnabled()) - log.debug("Configuring non-privileged default Loader"); - parent = getParentClassLoader(); - } - WebappLoader webappLoader = new WebappLoader(parent); + WebappLoader webappLoader = new WebappLoader(getParentClassLoader()); webappLoader.setDelegate(getDelegate()); setLoader(webappLoader); } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextRuleSet.java URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextRuleSet.java?rev=439322&r1=439321&r2=439322&view=diff ============================================================================== --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextRuleSet.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextRuleSet.java Fri Sep 1 06:54:50 2006 @@ -126,8 +126,6 @@ if (create) { digester.addRule(prefix + "Context", - new CopyParentClassLoaderRule()); - digester.addRule(prefix + "Context", new LifecycleListenerRule ("org.apache.catalina.startup.ContextConfig", "configClass")); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org