public Object run() throws ClassNotFoundException { return Loader.loadClass(clasName); } });
/** * Gets the resource with the specified class loader. * * @param loader * @param resource * @return Returns URL. * @throws ClassNotFoundException */ static public URL getResource(ClassLoader loader, String resource) throws ClassNotFoundException { URL url = null; try { if (loader != null) { log.debug("Trying to find [" + resource + "] using " + loader + " class loader."); url = loader.getResource(resource); if (url != null) { return url; } } } catch (Throwable t) { log.warn("Caught Exception while in Loader.getResource. This may be innocuous.", t); } return getResource(resource); }
/** * Gets the resource with the specified class loader. * * @param loader * @param resource * @return Returns URL. * @throws ClassNotFoundException */ static public InputStream getResourceAsStream(ClassLoader loader, String resource) throws ClassNotFoundException { try { if (loader != null) { log.debug("Trying to find [" + resource + "] using " + loader + " class loader."); InputStream is = loader.getResourceAsStream(resource); if (is != null) { return is; } } } catch (Throwable t) { log.warn("Caught Exception while in Loader.getResource. This may be innocuous.", t); } return getResourceAsStream(resource); }
public AxisConfiguration getAxisConfiguration() throws AxisFault { InputStream configStream = Loader.getResourceAsStream("org/apache/axis2/transport/axis2.xml"); try { axisConfig = populateAxisConfiguration(configStream); } finally { try { configStream.close(); } catch (IOException ex) { throw AxisFault.makeFault(ex); } } try { loadRepositoryFromURL(new URL(Loader.getResource("org/apache/axis2/transport/repo/__root__"), ".")); } catch (MalformedURLException ex) { throw AxisFault.makeFault(ex); } axisConfig.setConfigurator(this); return axisConfig; }
ClassLoader tcl = getTCL();
public AxisConfiguration getAxisConfiguration() throws AxisFault { InputStream configStream = Loader.getResourceAsStream("org/apache/axis2/transport/axis2.xml"); try { axisConfig = populateAxisConfiguration(configStream); } finally { try { configStream.close(); } catch (IOException ex) { throw AxisFault.makeFault(ex); } } try { loadRepositoryFromURL(new URL(Loader.getResource("org/apache/axis2/transport/repo/__root__"), ".")); } catch (MalformedURLException ex) { throw AxisFault.makeFault(ex); } axisConfig.setConfigurator(this); return axisConfig; }
ClassLoader tcl = getTCL();
public Object run() throws ClassNotFoundException { return Loader.loadClass(clasName); } });
/** * Gets the resource with the specified class loader. * * @param loader * @param resource * @return Returns URL. * @throws ClassNotFoundException */ static public InputStream getResourceAsStream(ClassLoader loader, String resource) throws ClassNotFoundException { try { if (loader != null) { log.debug("Trying to find [" + resource + "] using " + loader + " class loader."); InputStream is = loader.getResourceAsStream(resource); if (is != null) { return is; } } } catch (Throwable t) { log.warn("Caught Exception while in Loader.getResource. This may be innocuous.", t); } return getResourceAsStream(resource); }
/** * Gets the resource with the specified class loader. * * @param loader * @param resource * @return Returns URL. * @throws ClassNotFoundException */ static public URL getResource(ClassLoader loader, String resource) throws ClassNotFoundException { URL url = null; try { if (loader != null) { log.debug("Trying to find [" + resource + "] using " + loader + " class loader."); url = loader.getResource(resource); if (url != null) { return url; } } } catch (Throwable t) { log.warn("Caught Exception while in Loader.getResource. This may be innocuous.", t); } return getResource(resource); }
classLoader = getTCL(); if (classLoader != null) { log.debug("Trying to find [" + resource + "] using " + classLoader +
private static Class getHandlerClass(String className, ClassLoader loader1) throws AxisFault { Class handlerClass; try { handlerClass = Loader.loadClass(loader1, className); } catch (ClassNotFoundException e) { throw AxisFault.makeFault(e); } return handlerClass; }
+ DeploymentConstants.AXIS2_CONFIGURATION_RESOURCE + " from classpath"); axis2Stream = Loader.getResourceAsStream(DeploymentConstants.AXIS2_CONFIGURATION_RESOURCE);
public AxisConfiguration getAxisConfiguration() throws AxisFault { URL axis2Url = Loader.getResource("org/apache/axis2/transport/repo/axis2.xml"); try { InputStream configStream = axis2Url.openStream(); try { axisConfig = populateAxisConfiguration(configStream); } finally { configStream.close(); } loadRepositoryFromURL(new URL(axis2Url, ".")); } catch (IOException ex) { throw AxisFault.makeFault(ex); } axisConfig.setConfigurator(this); return axisConfig; }
classLoader = getTCL(); if (classLoader != null) { log.debug("Trying to find [" + resource + "] using " + classLoader +
private static Class getHandlerClass(String className, ClassLoader loader1) throws AxisFault { Class handlerClass; try { handlerClass = Loader.loadClass(loader1, className); } catch (ClassNotFoundException e) { throw AxisFault.makeFault(e); } return handlerClass; }
+ DeploymentConstants.AXIS2_CONFIGURATION_RESOURCE + " from classpath"); axis2Stream = Loader.getResourceAsStream(DeploymentConstants.AXIS2_CONFIGURATION_RESOURCE);
try { classLoader = getTCL(); if (classLoader != null) { log.debug("Trying to find [" + resource + "] using " + classLoader +
/** * Loads the specified classloader and then falls back to the loadClass. * * @param loader * @param clazz * @return Returns Class. * @throws ClassNotFoundException */ static public Class loadClass(ClassLoader loader, String clazz) throws ClassNotFoundException { try { if (loader != null) { Class c = loader.loadClass(clazz); if (c != null) { return c; } } } catch (UnsupportedClassVersionError e) { log.debug(e); throw e; } catch (Throwable e) { log.debug(e); } return loadClass(clazz); }
} else { configStream = Loader.getResourceAsStream(DeploymentConstants.AXIS2_CONFIGURATION_RESOURCE);