My Oracle Support Banner

Different Behavior of the Thread Context Classloader with JDK 1.4 and JDK 1.5 (Doc ID 453373.1)

Last updated on APRIL 12, 2024

Applies to:

Oracle Containers for J2EE - Version 10.1.3.1.0 to 10.1.3.2.0 [Release AS10gR3]
Information in this document applies to any platform.

Symptoms

Using JDK 1.4 and JDK 1.5 with OC4J 10.1.3.1 or 10.1.3.2 leads to different results:

There is a different behavior of the Thread Context ClassLoader with different versions of JDK.

With JDk 1.5, Thread Context ClassLoader (received from Thread.currentThread().getContextClassLoader()) in all threads is the same ClassLoader instance as the current ClassLoader (received from getClass().getClassLoader()).

With JDK 1.4, Thread Context ClassLoader (in the threads, created by application) is NOT the same ClassLoader instance as the current ClassLoader. It is even the instance of a different Class.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.