for(int mbeanCtr=0; mbeanCtr < objectNames.length; mbeanCtr++ ){
final String configName = request.getParameter(objectNames[mbeanCtr]);
if(GenericValidator.isBlankOrNull(configName) ||
applicationConfig.containsMBean(objectNames[mbeanCtr]))
continue;
applicationConfig.addMBean(new MBeanConfig(configName,
objectNames[mbeanCtr]));
ApplicationConfigManager.updateApplication(applicationConfig);
if(mbeanConfigForm.isApplicationCluster()){
logMsg = "Added "+objectNames[mbeanCtr]+" to " +
"application cluster " + applicationConfig.getName();
}else{
logMsg = "Added "+objectNames[mbeanCtr]+" to " +
"application " + applicationConfig.getName();
}
logMsg += "\n";
}
}else{
final String configName = mbeanConfigForm.getName()[0];
applicationConfig.addMBean(new MBeanConfig(configName,
mbeanConfigForm.getObjectName()));
ApplicationConfigManager.updateApplication(applicationConfig);
if(mbeanConfigForm.isApplicationCluster()){
logMsg = "Added "+mbeanConfigForm.getObjectName()+" to " +