try {
instance = Class.forName(value).newInstance();
} catch (ClassNotFoundException e) {
String msg = "The class specified by the " + name + " attribute was not found";
log.error(msg, e);
throw new SynapseException(msg, e);
} catch (Exception e) {
String msg = "The class " + value + " could not be instantiated";
log.error(msg, e);
throw new SynapseException(msg, e);
}
if (SOURCE_BUILDER_FACTORY.equals(name)) {
sourceBuilderFactory = (SourceBuilderFactory)instance;
} else {
resultBuilderFactory = (ResultBuilderFactory)instance;
}
} else {
try {
transFact.setAttribute(name, value);
} catch (IllegalArgumentException e) {
String msg = "Error occurred when setting attribute to the TransformerFactory";
log.error(msg, e);
throw new SynapseException(msg, e);
}
}
}