public Object newInstance(String className) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException {
return newInstance(classloader.loadClass(className));
}
public Object newInstance(Class<?> clazz) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException {
final ComponentInstantiator instantiator = webComponentInstantiatorMap.get(clazz.getName());
if(instantiator != null) {
return instantiate(instantiator);
}
return clazz.newInstance();
}