public ProtocolHandler load(String name, Configuration config) throws LoadingException {
try {
// Use the classloader which is used for bean instance stuff
Class<ProtocolHandler> c = (Class<ProtocolHandler>) getBeanFactory().getBeanClassLoader().loadClass(name);
ProtocolHandler handler = (ProtocolHandler) getBeanFactory().createBean(c, AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT, true);
if (handler instanceof LifecycleAwareProtocolHandler) {
((InitializingLifecycleAwareProtocolHandler) handler).init(config);
}
return handler;
} catch (ClassNotFoundException e) {