问题
The documentation on classloaders here ( you have to go through the menus... WebSphere Application Server (Distributed operating systems), Version 8.5 > Developing applications > Developing applications in the full profile environment > Class loading ) say this in regards to class loading order:
- The bootstrap, extensions, and CLASSPATH class loaders created by the Java virtual machine
- A WebSphere extensions class loader
- One or more application module class loaders that load elements of enterprise applications running in the server (jars, ejb mods, etc...)
- Zero or more web module class loaders (wars...)
under point 3 it briefly says that The product enables you to associate shared libraries with an application. however I'm assuming that refers to the websphere shared libraries feature external to the ear itself.
I cannot find where it says what classloader loads the lib folder of an EAR. Which one is it?
回答1:
The EAR lib libraries should be loaded by the application class loader which is the same with the class loader referred in No 3 point you mention (the application module class loader).
This is more clearly showed in the following shape. The EAR lib libraries belong in the Application Classpath.
来源:https://stackoverflow.com/questions/22343291/what-classloader-loads-the-lib-directory-of-an-ear-in-websphere-or-in-general