Classloader modes
There are two possible values for a classloader mode. These values can be changed using the administrative console.
PARENT_FIRST
The PARENT_FIRST classloader mode causes the classloader to first delegate the loading of classes to its parent classloader (the classloader up one level in the classloader hierarchy) before attempting to load the class from its local classpath. For more information on the classloader hierarchy, see Classloader hierarchy. This is the default classloader policy for all classloaders. This default can be changed for the classloaders supplied by the WebSphere run time. It can not be changed for the JVM classloaders.PARENT_LAST
The PARENT_LAST classloader mode causes the classloader (the classloader up one level in the classloader hierarchy) to first attempt to load classes from its local classpath before delegating the classloading to its parent. This policy allows an application classloader to override and provide its own version of a class that exists in the parent classloader.
There are three Classloader mode settings:
- on an application server
- on an application
- on a web module
The Classloader policy determines the number of classloaders used for your application. For more information, see Classloader policy. Depending on your classloader policy settings, some classloader mode settings are not used. The Classloader mode settings are used as follows:
If the Application classloader policy of an application server is SINGLE, the Application classloader mode of an application server defines the mode for an application classloader.
If the Application classloader policy of an application server is MULTIPLE, the Application classloading mode of an application defines the mode for an application classloader.
If the WAR classloader policy of an application is MODULE, the Classloader mode of a Web module defines the mode for a WAR classloader. If the WAR classloader policy of an application is MODULE, the Classloader mode of a Web module is not used, since Web modules are loaded by the Application classloader.