Project

Profile

Help

Bug #18

closed

ClassLoader for generated bytecode

Added by Anonymous almost 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Internals
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Legacy ID:
sf-3480036
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

SourceForge user: mhkay

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.

Please register to edit this issue

Also available in: Atom PDF