String httpsRouting, String reloadInterval, String monitor,
String routeCookie, String target, Properties props)
throws MBeanException
{
LbConfigs lbConfigs = null;
LbConfig newConfig = null;
try {
lbConfigs = getLbConfigs();
newConfig = new LbConfig();
if (configName == null) {
if (target == null) {
target =
SystemPropertyConstants.DEFAULT_SERVER_INSTANCE_NAME;
}
// lb config name is derived by adding a suffix to the target
configName = target + "-http-lb-config";
}
newConfig.setName(configName);
newConfig.setResponseTimeoutInSeconds(
new Integer(responseTimeout).toString());
newConfig.setReloadPollIntervalInSeconds(
new Integer(reloadInterval).toString());
newConfig.setMonitoringEnabled(
Boolean.valueOf(monitor).booleanValue());
newConfig.setRouteCookieEnabled(
Boolean.valueOf(routeCookie).booleanValue());
newConfig.setHttpsRouting(
Boolean.valueOf(httpsRouting).booleanValue());
ElementProperty [] eProps = getElementProperty(props);
if (eProps != null) {
newConfig.setElementProperty(eProps);
}
// XXX do I need to use setConfig instead?
lbConfigs.addLbConfig(newConfig);
} catch(ConfigException ce) {