Author: markt
Date: Sun May 23 11:32:12 2010
New Revision: 947397

URL: http://svn.apache.org/viewvc?rev=947397&view=rev
Log:
Don't add HostConfig as a listener twice. It breaks the Manager app and 
probably other stuff too.

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardHost.java
    tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHost.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardHost.java?rev=947397&r1=947396&r2=947397&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardHost.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardHost.java Sun May 23 
11:32:12 2010
@@ -33,7 +33,6 @@ import org.apache.catalina.LifecycleList
 import org.apache.catalina.Valve;
 import org.apache.catalina.loader.WebappClassLoader;
 import org.apache.catalina.mbeans.MBeanUtils;
-import org.apache.catalina.startup.HostConfig;
 import org.apache.catalina.util.LifecycleBase;
 import org.apache.catalina.valves.ValveBase;
 
@@ -802,16 +801,6 @@ public class StandardHost extends Contai
     }
 
     @Override
-    protected void initInternal() throws LifecycleException {
-
-        super.initInternal();
-
-        HostConfig deployer = new HostConfig();
-        addLifecycleListener(deployer);                
-    }
-
-    
-    @Override
     protected String getObjectNameKeyProperties() {
 
         StringBuilder keyProperties = new StringBuilder("type=Host");

Modified: tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java?rev=947397&r1=947396&r2=947397&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java Sun May 
23 11:32:12 2010
@@ -56,7 +56,7 @@ public class TestRegistration extends To
 
         // Verify there are some Tomcat MBeans
         onames = mbeanServer.queryNames(new ObjectName("Tomcat:*"), null);
-        assertTrue("Not enough Tomcat MBeans", onames.size() >= 21);
+        assertTrue("Not enough Tomcat MBeans", onames.size() >= 20);
 
         tomcat.stop();
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to