30 August 2005

Classloading in OC4J 10.1.3

Updated 13-Nov-2006:

1. Link to official classloading documentation for 10.1.3.1
2. Linked to classloading related how-to examples
The classloading implementation in OC4J 10g (10.1.3.x) has been entirely reworked. One of the general goals of the project was to cleanly separate the classloaders used by the OC4J runtime from the classloaders used by applications -- to ultimately provide applications with the freedom to use whatever libraries they require without effecting the overall OC4J runtime.

As part of the new framework, a number of new concepts have been introduced:

1. A new entity called a shared-libary has been added, which enables a set of libraries to be explicitly named and versioned. A named/versioned shared-library can subsequently be made available (imported) to a classloader (an created for an application) so the libraries can be accessed by the application.

2. All the new classloader implementation classes are capable of outputting detailed diagnostic information when classloading errors occur. The diagnostic included detailed such as the names of any missing classes which are attempted to be loaded, where the call was made from and the name/version of any shared-libraries in which the missing class is available.

3. A query mechanism which can be used to extract and display information from the classloaders that are in use. This for example allows the classloader tree to be displayed for a specific application, showing the path from which classes are loaded. The classloader tree also lists all of the code-sources associated with each loader.

A lot of the new classloading framework is documented in the OC4J 10g (10.1.3) Developer's Guide on OTN.

No comments: