Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 74575 invoked from network); 14 Mar 2003 23:49:34 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 14 Mar 2003 23:49:34 -0000 Received: (qmail 21937 invoked by uid 97); 14 Mar 2003 23:51:23 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 21930 invoked from network); 14 Mar 2003 23:51:23 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 14 Mar 2003 23:51:23 -0000 Received: (qmail 73681 invoked by uid 500); 14 Mar 2003 23:49:24 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 73670 invoked by uid 500); 14 Mar 2003 23:49:24 -0000 Received: (qmail 73667 invoked from network); 14 Mar 2003 23:49:24 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 14 Mar 2003 23:49:24 -0000 Received: (qmail 4990 invoked by uid 1602); 14 Mar 2003 23:49:23 -0000 Date: 14 Mar 2003 23:49:23 -0000 Message-ID: <20030314234923.4989.qmail@icarus.apache.org> From: fhanik@apache.org To: jakarta-tomcat-catalina-cvs@apache.org Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N fhanik 2003/03/14 15:49:23 Modified: catalina/src/share/org/apache/catalina/core StandardContext.java Log: small change to allow the cluster to throw an exception when it decides not to cluster enable a context, and at that point, we simply fallback on the StandardManager Revision Changes Path 1.27 +20 -15 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.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- StandardContext.java 12 Mar 2003 21:32:49 -0000 1.26 +++ StandardContext.java 14 Mar 2003 23:49:22 -0000 1.27 @@ -158,10 +158,10 @@ /** * The alternate deployment descriptor name. - */ + */ private String altDDName = null; - + /** * The set of application listener class names configured for this * application, in the order they were encountered in the web.xml file. @@ -791,15 +791,15 @@ } - + /** * Return the alternate Deployment Descriptor name. */ public String getAltDDName(){ return altDDName; } - - + + /** * Set an alternate Deployment Descriptor name. */ @@ -1145,7 +1145,7 @@ if (context == null) { context = new ApplicationContext(getBasePath(), this); - if (altDDName != null) + if (altDDName != null) context.setAttribute(Globals.ALT_DD_ATTR,altDDName); } return (context.getFacade()); @@ -1261,7 +1261,7 @@ // The proxied resources will be refreshed on start this.resources = null; - support.firePropertyChange("resources", oldResources, + support.firePropertyChange("resources", oldResources, this.webappResources); } @@ -1634,19 +1634,19 @@ * property group, we only care about the URL pattern here. The * JSP container will parse the rest. * - * @param pattern URL pattern to be mapped + * @param pattern URL pattern to be mapped */ public void addJspMapping(String pattern) { String servletName = findServletMapping("*.jsp"); if (servletName == null) { servletName = "jsp"; } - + // Properly handle file that are considered to be a jsp. if (pattern.indexOf("*.") > 0){ pattern = pattern.substring(pattern.lastIndexOf("*")); servletName = "jsp"; - } + } addServletMapping(pattern, servletName); } @@ -3625,7 +3625,7 @@ env.put(ProxyDirContext.CONTEXT, getName()); try { - ProxyDirContext proxyDirContext = + ProxyDirContext proxyDirContext = new ProxyDirContext(env, webappResources); if (webappResources instanceof BaseDirContext) { ((BaseDirContext) webappResources).setDocBase(getBasePath()); @@ -3751,7 +3751,7 @@ // Set config file name String appBase = getAppBase(); if (getConfigFile() == null && appBase != null) { - + String name = getName(); if (name.equals("")) { name = "ROOT"; @@ -3798,7 +3798,12 @@ if (log.isDebugEnabled()) log.debug("Configuring default Manager"); if (getCluster() != null) { - setManager(getCluster().createManager(getName())); + try { + setManager(getCluster().createManager(getName())); + } catch ( Exception x ) { + log.warn("Clustering disabled for context:"+getName()+" reason:"+x.getMessage()); + setManager(new StandardManager()); + } } else { setManager(new StandardManager()); } @@ -4464,7 +4469,7 @@ Class.forName("org.apache.catalina.valves.RequestListenerValve"); requestListener = (Valve) clazz.newInstance(); } catch (Throwable t) { - return false; + return false; } // Add this Valve to our Pipeline --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org