if (interval != null) { hc.setIntervalInSeconds(interval); }
if (timeout != null) { hc.setTimeoutInSeconds(timeout); }
// target is a cluster
if (ClusterHelper.isACluster(ctx, target)) {
ClusterRef cRef = lbConfig.getClusterRefByRef(target);
// cluster is not associated to this lb config
if ((cRef == null) && (ignoreError == false)){
String msg = _strMgr.getString("UnassociatedCluster",
lbConfigName, target);
throw new MBeanException (new ConfigException(msg));
}
if ( (cRef != null) && (cRef.getHealthChecker() == null) ){
cRef.setHealthChecker(hc);
_logger.log(Level.INFO,_sMgr.getString(
"http_lb_admin.HealthCheckerCreated", target));
} else {
if (ignoreError == false) {
String msg = _strMgr.getString("HealthCheckerExists",
cRef.getRef());
throw new MBeanException (new ConfigException(msg));
}
}
// target is a server