if (!(pluginLoaderObj instanceof PluginLoader)) {
throw new ConfigurationException("Failed to cast adapter loader class '" + className + "' to " + PluginLoader.class.getName());
}
PluginLoader pluginLoader = (PluginLoader) pluginLoaderObj;
PluginLoaderInitContext context = new PluginLoaderInitContext(config.getLoaderName(), config.getConfigProperties(), config.getConfigurationXML(), this);
pluginLoader.init(context);
// register adapter loader in JNDI context tree
try
{
services.getEngineEnvContext().bind("plugin-loader/" + config.getLoaderName(), pluginLoader);