chain[i] = (T) spiClass.newInstance();
log.debug(type.getName() + " : " + className + " is loaded");
} catch (ClassNotFoundException ex) {
throw new ServiceException("Cannot find the class: " + className, ex);
} catch (IllegalAccessException ex) {
throw new ServiceException("Cannot access the class: " + className, ex);
} catch (InstantiationException ex) {
throw new ServiceException("Cannot init the class: " + className, ex);
}
}
return chain;
}