Took care of JMX error upon startup, component still not working, but at least its...
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 9 Mar 2007 15:46:20 +0000 (15:46 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 9 Mar 2007 15:46:20 +0000 (15:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@516438 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
java/org/apache/catalina/ha/deploy/mbeans-descriptors.xml [new file with mode: 0644]
java/org/apache/catalina/ha/mbeans-descriptors.xml

index 8d877a1..4b65259 100644 (file)
@@ -149,15 +149,18 @@ public class FarmWarDeployer extends ClusterListener implements ClusterDeployer,
         // Check to correct engine and host setup
         Object parent = getCluster().getContainer();
         Engine engine = null;
+        String hostname = null;
         if ( parent instanceof Host ) {
             host = (Host) parent;
             engine = (Engine) host.getParent();
+            hostname = host.getName();
         }else {
             engine = (Engine)parent;
+            hostname = engine.getDefaultHost();
         }
         try {
             oname = new ObjectName(engine.getName() + ":type=Deployer,host="
-                    + host.getName());
+                    + hostname);
         } catch (Exception e) {
             log.error("Can't construct MBean object name" + e);
         }
diff --git a/java/org/apache/catalina/ha/deploy/mbeans-descriptors.xml b/java/org/apache/catalina/ha/deploy/mbeans-descriptors.xml
new file mode 100644 (file)
index 0000000..378b962
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>\r
+<mbeans-descriptors>\r
+  <mbean         \r
+    name="FarmWarDeployer"\r
+    className="org.apache.catalina.mbeans.ClassNameMBean"\r
+    description="Farm Deployer - Broken"\r
+    domain="Catalina"\r
+    group="Cluster"\r
+    type="org.apache.catalina.ha.deploy.FarmWarDeployer">\r
+  </mbean>\r
+</mbeans-descriptors>\r
index 7f54550..8a4f610 100644 (file)
@@ -8,10 +8,6 @@
                 group="Cluster"
                  type="org.apache.catalina.ha.tcp.SimpleTcpCluster">
 
-    <attribute   name="protocolStack"
-          description="JavaGroups protocol stack selection"
-                 type="java.lang.String"/>
-
   </mbean>