Author: remy.maucherat(a)jboss.com
Date: 2010-10-26 09:38:08 -0400 (Tue, 26 Oct 2010)
New Revision: 1567
Modified:
trunk/java/org/apache/catalina/core/StandardContext.java
Log:
- Add a system property for the cross context default.
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2010-10-26 13:37:40 UTC (rev
1566)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2010-10-26 13:38:08 UTC (rev
1567)
@@ -310,7 +310,8 @@
* Should we allow the <code>ServletContext.getContext()</code> method
* to access the context of other web applications in this server?
*/
- protected boolean crossContext = false;
+ protected boolean crossContext =
+
Boolean.valueOf(System.getProperty("org.apache.catalina.core.StandardContext.CROSS_CONTEXT",
"false")).booleanValue();
/**
@@ -4716,14 +4717,14 @@
if (configClassName != null) {
Class clazz = Class.forName(configClassName);
config = (LifecycleListener) clazz.newInstance();
- } else {
- config = new ContextConfig();
}
} catch (Exception e) {
log.warn("Error creating ContextConfig for " + parentName, e);
throw e;
}
- this.addLifecycleListener(config);
+ if (config != null) {
+ this.addLifecycleListener(config);
+ }
if (log.isDebugEnabled()) {
log.debug("AddChild " + parentName + " " + this);
Show replies by date