String msg = _strMgr.getString("UnassociatedCluster",
lbConfigName, target);
throw new MBeanException (new ConfigException(msg));
}
HealthChecker hc = cRef.getHealthChecker();
if (hc != null) {
//cRef.removeHealthCheker(hc);
cRef.removeChild(hc, true);
_logger.log(Level.INFO,_sMgr.getString(
"http_lb_admin.HealthCheckerDeleted", target));
} else {
if (ignoreFailure == false) {
String msg = _strMgr.getString("HealthCheckerDoesNotExist",
target,lbConfigName);
throw new MBeanException (new ConfigException(msg));
}
}
// target is a server
} else if (ServerHelper.isAServer(ctx, target)) {
ServerRef sRef = lbConfig.getServerRefByRef(target);
// server is not associated to this lb config
if ((sRef == null) && (ignoreFailure == false)){
String msg = _strMgr.getString("UnassociatedServer",
lbConfigName, target);
throw new MBeanException (new ConfigException(msg));
}
HealthChecker hc = sRef.getHealthChecker();
if (hc != null) {
//sRef.removeHealthCheker(hc);
sRef.removeChild(hc, true);
_logger.log(Level.INFO,_sMgr.getString(
"http_lb_admin.HealthCheckerDeleted", target));