Author: fhanik
Date: Tue Oct 17 07:05:50 2006
New Revision: 464928

URL: http://svn.apache.org/viewvc?view=rev&rev=464928
Log:
Fixed startup exception

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java?view=diff&rev=464928&r1=464927&r2=464928
==============================================================================
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java 
Tue Oct 17 07:05:50 2006
@@ -142,12 +142,18 @@
             watcher = new WarWatcher(this, new File(getWatchDir()));
             if (log.isInfoEnabled())
                 log.info("Cluster deployment is watching " + getWatchDir()
-                        + " for changes.");
+                         + " for changes.");
         }
-
+    
         // Check to correct engine and host setup
-        host = (Host) getCluster().getContainer();
-        Engine engine = (Engine) host.getParent();
+        Object parent = getCluster().getContainer();
+        Engine engine = null;
+        if ( parent instanceof Host ) {
+            host = (Host) parent;
+            engine = (Engine) host.getParent();
+        }else {
+            engine = (Engine)parent;
+        }
         try {
             oname = new ObjectName(engine.getName() + ":type=Deployer,host="
                     + host.getName());
@@ -157,8 +163,7 @@
         configBase = new File(System.getProperty("catalina.base"), "conf");
         if (engine != null) {
             configBase = new File(configBase, engine.getName());
-        }
-        if (host != null) {
+        } else if (host != null) {
             configBase = new File(configBase, host.getName());
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to