public void configureLBWeight(String clusterName, Map instanceVsWeights) {
//get ALL clustered <server> elements
Map<String,ClusterConfig> clusterConfigMap = mDomainConfig.getClusterConfigMap();
//get the cluster config for the given cluster
ClusterConfig clusterConfig = clusterConfigMap.get(clusterName);
if(clusterConfig == null)
throw new IllegalArgumentException(formatter.format(resBundle.getString("InvalidCluster"),clusterName));
//get the map of clustered server config
Map<String,ClusteredServerConfig> clusteredServerConfigMap = clusterConfig.getClusteredServerConfigMap();
//iterate through all the given weights and instances
for(Object instance:instanceVsWeights.keySet()){
//get the corresponding clustered server config for this instance
ClusteredServerConfig clusteredServerConfig = clusteredServerConfigMap.get(instance);
if(clusteredServerConfig == null)