/** * Creates an instance of the specified class using the specified * <code>ClassLoader</code> object. * * @exception WebServiceException if the given class could not be found * or could not be instantiated */ private static Object newInstance(String className, ClassLoader classLoader) { try { Class spiClass = safeLoadClass(className, classLoader); return spiClass.newInstance(); } catch (ClassNotFoundException x) { throw new WebServiceException( "Provider " + className + " not found", x); } catch (Exception x) { throw new WebServiceException( "Provider " + className + " could not be instantiated: " + x, x); } }
/** * Creates an instance of the specified class using the specified * <code>ClassLoader</code> object. * * @exception WebServiceException if the given class could not be found * or could not be instantiated */ private static Object newInstance(String className, ClassLoader classLoader) { try { Class spiClass = safeLoadClass(className, classLoader); return spiClass.newInstance(); } catch (ClassNotFoundException x) { throw new WebServiceException( "Provider " + className + " not found", x); } catch (Exception x) { throw new WebServiceException( "Provider " + className + " could not be instantiated: " + x, x); } }