String className = (String) props.get(extension);
if (className == null || !ClassUtils.isClassOnPath(className, this.getClass()))
{
throw new ConfigurationException(
CoreMessages.configurationBuilderNoMatching(createConfigResourcesString()));
}
ConfigResource[] constructorArg = new ConfigResource[configs.size()];
System.arraycopy(configs.toArray(), 0, constructorArg, 0, configs.size());
ConfigurationBuilder cb = (ConfigurationBuilder) ClassUtils.instanciateClass(className, new Object[] {constructorArg});
cb.configure(muleContext);
}
}
catch (ConfigurationException e)
{
throw e;
}
catch (Exception e)
{
throw new ConfigurationException(e);
}
}