Container econtainer = host.getParent();
if(econtainer == null && econtainer instanceof Engine) {
log.error("FarmWarDeployer can only work if parent of " + host.getName()+ " is an engine!");
return ;
}
Engine engine = (Engine) econtainer;
String hostname = null;
hostname = host.getName();
try {
oname = new ObjectName(engine.getName() + ":type=Deployer,host="
+ hostname);
} catch (Exception e) {
log.error("Can't construct MBean object name" + e);
return;
}
if (watchEnabled) {
watcher = new WarWatcher(this, new File(getWatchDir()));
if (log.isInfoEnabled()) {
log.info("Cluster deployment is watching " + getWatchDir()
+ " for changes.");
}
}
configBase = new File(System.getProperty("catalina.base"), "conf");
if (engine != null) {
configBase = new File(configBase, engine.getName());
}
if (host != null) {
configBase = new File(configBase, hostname);
}