Java Code Examples for org.jboss.modules.ModuleClassLoader#getResource()
The following examples show how to use
org.jboss.modules.ModuleClassLoader#getResource() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SpringJeeNamespaceTest.java From wildfly-camel with Apache License 2.0 | 5 votes |
@Test public void testLoadHandlersFromSpringContext() throws Exception { ModuleLoader moduleLoader = Module.getCallerModuleLoader(); ModuleClassLoader classLoader = moduleLoader.loadModule("org.springframework.context").getClassLoader(); URL resurl = classLoader.getResource("META-INF/spring.handlers"); Assert.assertNotNull("URL not null", resurl); }
Example 2
Source File: SpringJeeNamespaceTest.java From wildfly-camel with Apache License 2.0 | 5 votes |
@Test public void testLoadHandlersFromCamel() throws Exception { ModuleLoader moduleLoader = Module.getCallerModuleLoader(); ModuleClassLoader classLoader = moduleLoader.loadModule("org.apache.camel").getClassLoader(); URL resurl = classLoader.getResource("META-INF/spring.handlers"); Assert.assertNotNull("URL not null", resurl); }
Example 3
Source File: CXFResourcesTest.java From wildfly-camel with Apache License 2.0 | 5 votes |
@Test public void testAccessFromCXFModule() throws Exception { ModuleLoader moduleLoader = Module.getCallerModuleLoader(); ModuleIdentifier modid = ModuleIdentifier.create("org.apache.cxf"); ModuleClassLoader classLoader = moduleLoader.loadModule(modid).getClassLoader(); URL resurl = classLoader.getResource("META-INF/cxf/cxf.xml"); Assert.assertNotNull("URL not null", resurl); }
Example 4
Source File: CXFResourcesTest.java From wildfly-camel with Apache License 2.0 | 5 votes |
@Test public void testAccessFromCXFComponentModule() throws Exception { ModuleLoader moduleLoader = Module.getCallerModuleLoader(); ModuleIdentifier modid = ModuleIdentifier.create("org.apache.camel.component.cxf"); ModuleClassLoader classLoader = moduleLoader.loadModule(modid).getClassLoader(); URL resurl = classLoader.getResource("META-INF/cxf/cxf.xml"); Assert.assertNotNull("URL not null", resurl); }
Example 5
Source File: CXFResourcesTest.java From wildfly-camel with Apache License 2.0 | 5 votes |
@Test public void testAccessFromCamelComponentModule() throws Exception { ModuleLoader moduleLoader = Module.getCallerModuleLoader(); ModuleIdentifier modid = ModuleIdentifier.create("org.apache.camel.component"); ModuleClassLoader classLoader = moduleLoader.loadModule(modid).getClassLoader(); URL resurl = classLoader.getResource("META-INF/cxf/cxf.xml"); Assert.assertNotNull("URL not null", resurl); }