in modules/vfs-class-loader/src/main/java/org/apache/accumulo/classloader/vfs/context/ReloadingVFSContextClassLoaderFactory.java [317:329]
public synchronized ClassLoader getClassLoader(String contextName)
throws IllegalArgumentException {
if (!CONTEXTS.containsKey(contextName)) {
throw new IllegalArgumentException(
"ReloadingVFSContextClassLoaderFactory not configured for context: " + contextName);
}
// The JVM maintains a cache of loaded classes where the key is the ClassLoader
// instance and the loaded Class name (see ClassLoader.findLoadedClass()). So
// that we can return new implementations of the same class when the context
// changes we need to load the class from the delegate classloader directly
// since the delegate instance will be recreated when the context changes.
return CONTEXTS.get(contextName).unwrap();
}