When Saxon-EE generates bytecode, it loads the generated classes using a custom ClassLoader whose parent ClassLoader is obtained using getClass().getClassLoader(). In some circumstances this parent ClassLoader can subsequently be invoked for loading resources such as extension functions referenced by the generated bytecode. In an environment with specialized class loading requirements, this may be inadequate, and it may be preferable to use the context class loader for the thread instead. A patch is being raised whose effect is to choose which ever of the following first produces a result:
(a) the user-defined ClassLoader registered with configuration.getDynamicLoader().setClassLoader()
(b) the result of Thread.currentThread().getContextClassLoader()
(c) the result of getClass().getClassLoader()
This is consistent with the strategy Saxon generally uses for dynamic loading of classes.