fhanik 2003/04/12 19:38:02
Modified: catalina/src/share/org/apache/catalina/core
StandardContext.java
Log:
must look at the distributable element in web.xml before setting a replication
manager
Revision Changes Path
1.37 +8 -6
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
Index: StandardContext.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- StandardContext.java 9 Apr 2003 19:25:39 -0000 1.36
+++ StandardContext.java 13 Apr 2003 02:38:02 -0000 1.37
@@ -871,14 +871,12 @@
}
-
/**
* Set the distributable flag for this web application.
*
* @param distributable The new distributable flag
*/
public void setDistributable(boolean distributable) {
-
boolean oldDistributable = this.distributable;
this.distributable = distributable;
support.firePropertyChange("distributable",
@@ -1798,7 +1796,6 @@
* registered
*/
public void addParameter(String name, String value) {
-
// Validate the proposed context initialization parameter
if ((name == null) || (value == null))
throw new IllegalArgumentException
@@ -3498,7 +3495,6 @@
if (log.isDebugEnabled())
log.debug("Starting filters");
-
// Instantiate and record a FilterConfig for each defined filter
boolean ok = true;
synchronized (filterConfigs) {
@@ -3890,7 +3886,13 @@
log.debug("Configuring default Manager");
if (getCluster() != null) {
try {
- setManager(getCluster().createManager(getName()));
+ if ( this.getDistributable() ) {
+ log.info("Creating clustering manager for
context="+getName());
+ setManager(getCluster().createManager(getName()));
+ } else {
+ log.info("Ignoring clustering manager for
context="+getName()+ " element <distributable> not present in web.xml");
+ setManager(new StandardManager());
+ }
} catch ( Exception x ) {
log.warn("Clustering disabled for context:"+getName()+"
reason:"+x.getMessage());
setManager(new StandardManager());
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]