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 <strong>after</strong> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]