}
if (s == null ) {
String msg = _strMgr.getString("ServerNotDefined", serverName);
throw new MBeanException ( new ConfigException(msg));
}
ApplicationRef appRef = s.getApplicationRefByRef(appName);
if (appRef == null ) {
String msg = _strMgr.getString("AppRefNotDefined", appName,
serverName);
throw new MBeanException ( new ConfigException(msg));
}
int curTout = Integer.parseInt(appRef.getDisableTimeoutInMinutes());
boolean enabled = appRef.isLbEnabled();
if ((enabled == false) && (curTout == timeout)) {
String msg = _strMgr.getString("AppDisabledOnServer",
appRef.getRef(), serverName);
throw new MBeanException(new ConfigException(msg));
}
appRef.setLbEnabled(false);
appRef.setDisableTimeoutInMinutes(new Integer(timeout).toString());
_logger.log(Level.INFO,_sMgr.getString(
"http_lb_admin.ApplicationDisabled", appName,serverName));
}