public void setLbEnabledFlag(String lbenableallInstances, String clbConfigName)
throws MBeanException {
try {
ConfigContext ctx = AdminService.getAdminService().getAdminContext().getAdminConfigContext();
Domain domain = (Domain) ctx.getRootConfigBean();
Clusters clusters = domain.getClusters();
ConvergedLbConfig clbConfig = domain.getConvergedLbConfigs().getConvergedLbConfigByName(clbConfigName);
ConvergedLbClusterRef[] clbRef = clbConfig.getConvergedLbClusterRef();
ServerRef[] servRefs = clbConfig.getServerRef();
if ((lbenableallInstances != null) && (lbenableallInstances.equals("true")))
{
//Set LbEnabled flag for Cluster Instances
for (int ref=0; ref < clbRef.length; ref++) {
String clusterName = clbRef[ref].getRef();
if (clusterName != null ) {
Cluster cluster = clusters.getClusterByName(clusterName);
ServerRef[] serverRefs = cluster.getServerRef();
for (int i=0; i < serverRefs.length; i++) {
if (!serverRefs[i].isLbEnabled())
serverRefs[i].setLbEnabled(true);
}