reloadingClassLoader = new ReloadingClassLoader(getClassLoader());
}
protected ClassLoaderInterface getClassLoaderInterface() {
if (isReloadEnabled())
return new ClassLoaderInterfaceDelegate(this.reloadingClassLoader);
else {
/*
* if there is a ClassLoaderInterface in the context, use it,
* otherwise default to the default ClassLoaderInterface (a wrapper
* around the current thread classloader) using this, other plugins
* (like OSGi) can plugin their own classloader for a while and it
* will be used by Convention (it cannot be a bean, as Convention is
* likely to be called multiple times, and it needs to use the
* default ClassLoaderInterface during normal startup)
*/
ClassLoaderInterface classLoaderInterface = null;
ActionContext ctx = ActionContext.getContext();
if (ctx != null)
classLoaderInterface = (ClassLoaderInterface) ctx
.get(ClassLoaderInterface.CLASS_LOADER_INTERFACE);
return (ClassLoaderInterface) ObjectUtils.defaultIfNull(
classLoaderInterface, new ClassLoaderInterfaceDelegate(
getClassLoader()));
}
}