_logger.log(Level.FINE,"sgmt.reconfig_handlecreatereceived");
try{
ConfigContext configContext = event.getConfigContext();
Config config = ServerBeansFactory.getConfigBean(configContext);
ConfigAdd configAdd = null;
ConfigChange configChange = null;
ArrayList<ConfigChange> configChangeList = event.getConfigChangeList();
ManagementRule rule = null;
String xpath = null;
String pXPath = null;
Object object;
String ruleName = null;
for (int i=0; i < configChangeList.size(); i++){
configChange = configChangeList.get(i);
if (configChange instanceof ConfigAdd) {
_logger.log(Level.INFO,"sgmt.reconfig_handlecreaterulereceived");
xpath = configChange.getXPath();
if (xpath != null) {
_logger.log(Level.INFO, "sgmt.reconfig_handlexpath",xpath);
rule = (ManagementRule)configContext.exactLookup(xpath);
if (rule.isEnabled())
service.addRule(rule, configContext);
else
service.addDisabledRule(rule);
}
} else if(configChange instanceof ConfigSet) {
//handle action addition
pXPath = configChange.getParentXPath();
String name = configChange.getName();
if (name.equals(ManagementRule.ACTION)) {
_logger.log(Level.INFO,"smgt.handleactionadd",pXPath);
rule = (ManagementRule)configContext.exactLookup(pXPath);
service.handleActionAdd(rule, configContext);
}