* else is using this config)
*/
public void removeLoadbalancer(String loadbalancerName) {
//first get the lbConfigName
final LoadBalancerConfig loadbalancerConfig =
mDomainConfig.getLoadBalancerConfigMap().get(loadbalancerName);
if(loadbalancerConfig == null){
final String msg = formatter.format(
resBundle.getString("LoadBalancerConfigNotDefined"),loadbalancerName);
throw new RuntimeException(msg);
}
final String lbConfigName = loadbalancerConfig .getLbConfigName();
//get the load balancers map
final Map<String, LoadBalancerConfig> lbMap = mDomainConfig.getLoadBalancerConfigMap();
if ( lbMap != null) {
// check to see if any other load-balancer is using lb-config
for(LoadBalancerConfig lbConfig : lbMap.values()){
if (!lbConfig.getName().equals(loadbalancerConfig.getName()) &&
lbConfig.getLbConfigName().equals(lbConfigName)) {
// this load-balancer element is still using it
final String msg = formatter.format(resBundle.getString("LbConfigIsInUse"),
lbConfigName);
throw new RuntimeException(msg);