String key = "sdisuite.integrationContextClass";
String className =Val.chkStr(config.getValue(key));
if (className.length() == 0) {
String msg = "The configured "+key+" was empty";
throw new ConfigurationException(msg);
} else {
Class<?> cls = Class.forName(className);
Object obj = cls.newInstance();
if (obj instanceof IntegrationContext) {
IntegrationContext ictx = (IntegrationContext)obj;
ictx.setConfig(config);
return ictx;
} else {
String msg = "The configured "+key+" is invalid: "+ className;
throw new ConfigurationException(msg);
}
}
}