return getResources('/' + resourceName, callingClass);
return getResources('/' + resourceName, callingClass);
return getResources('/' + resourceName, callingClass);
return getResources('/' + resourceName, callingClass);
return getResources('/' + resourceName, callingClass);
private void init() { try { jaxbContext = JAXBContext.newInstance("org.apache.cxf.tools.plugin"); loadPlugins(ClassLoaderUtils.getResources(PLUGIN_FILE_NAME, getClass())); } catch (JAXBException e) { Message msg = new Message("JAXB_CONTEXT_INIT_FAIL", LOG); LOG.log(Level.SEVERE, msg.toString()); throw new ToolException(msg); } catch (IOException ioe) { Message msg = new Message("LOAD_PLUGIN_EXCEPTION", LOG); LOG.log(Level.SEVERE, msg.toString()); throw new ToolException(msg); } }
private void init() { try { jaxbContext = JAXBContext.newInstance("org.apache.cxf.tools.plugin"); loadPlugins(ClassLoaderUtils.getResources(PLUGIN_FILE_NAME, getClass())); } catch (JAXBException e) { Message msg = new Message("JAXB_CONTEXT_INIT_FAIL", LOG); LOG.log(Level.SEVERE, msg.toString()); throw new ToolException(msg); } catch (IOException ioe) { Message msg = new Message("LOAD_PLUGIN_EXCEPTION", LOG); LOG.log(Level.SEVERE, msg.toString()); throw new ToolException(msg); } }
/** * This is factored out to permit use in a unit test. * * @param bus * @return */ public static ApplicationContext getApplicationContext(List<String> additionalFilePathnames) { BusApplicationContext busApplicationContext = BusFactory.getDefaultBus() .getExtension(BusApplicationContext.class); GenericApplicationContext appContext = new GenericApplicationContext(busApplicationContext); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(appContext); List<URL> urls = ClassLoaderUtils.getResources("META-INF/cxf/java2wsbeans.xml", SpringServiceBuilderFactory.class); for (URL url : urls) { reader.loadBeanDefinitions(new UrlResource(url)); } for (String pathname : additionalFilePathnames) { try { reader.loadBeanDefinitions(new FileSystemResource(pathname)); } catch (BeanDefinitionStoreException bdse) { throw new ToolException("Unable to open bean definition file " + pathname, bdse.getCause()); } } appContext.refresh(); return appContext; }
/** * This is factored out to permit use in a unit test. * * @param bus * @return */ public static ApplicationContext getApplicationContext(List<String> additionalFilePathnames) { BusApplicationContext busApplicationContext = BusFactory.getDefaultBus() .getExtension(BusApplicationContext.class); GenericApplicationContext appContext = new GenericApplicationContext(busApplicationContext); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(appContext); List<URL> urls = ClassLoaderUtils.getResources("META-INF/cxf/java2wsbeans.xml", SpringServiceBuilderFactory.class); for (URL url : urls) { reader.loadBeanDefinitions(new UrlResource(url)); } for (String pathname : additionalFilePathnames) { try { reader.loadBeanDefinitions(new FileSystemResource(pathname)); } catch (BeanDefinitionStoreException bdse) { throw new ToolException("Unable to open bean definition file " + pathname, bdse.getCause()); } } appContext.refresh(); return appContext; }