@Test public void verifyClassLoader() throws Exception { try { Class clz = Class.forName("ClassLoaderTestClass", true, getClass().getClassLoader()); Assert.fail("Expected class loading to fail"); } catch (Throwable th) { log.error("Expected error " + th + " msg = "+th.getMessage(), th); } Class clz = Class.forName(TEST_CLASS, true, dbResService.getClassLoader(DB1)); Assert.assertNotNull(clz); }
protected ClassLoader getClassLoader(String database) { return classLoaderCache.get(database); }
DatabaseResourceService extends AbstractService { protected ClassLoader getClassLoader(String database) { return classLoaderCache.get(database); } }
DatabaseResourceService extends AbstractService { protected ClassLoader getClassLoader(String database) { return classLoaderCache.get(database); } DatabaseResourceService(String name); }
DatabaseResourceService extends AbstractService { protected ClassLoader getClassLoader(String database) { return classLoaderCache.get(database); } DatabaseResourceService(String name); @Override synchronized void start(); @Override synchronized void stop(); Collection<LensSessionImpl.ResourceEntry> getResourcesForDatabase(String database); }
DatabaseResourceService extends AbstractService { protected ClassLoader getClassLoader(String database) { return classLoaderCache.get(database); } DatabaseResourceService(String name); @Override synchronized void start(); @Override synchronized void stop(); Collection<LensSessionImpl.ResourceEntry> getResourcesForDatabase(String database); static final String NAME; static final String LOAD_RESOURCES_ERRORS; }