The JOnAS-specific commons class loader will load all classes and libraries required to start the JOnAS server (that is, libraries for mail, Tomcat, etc.). This class loader has the system class loader as parent class loader. The commons class loader adds all the common libraries required to start the JOnAS server (J2EE applications, commons logging, ObjectWeb components, etc.); it also loads the classes located in XTRA_CLASSPATH.
The JARs loaded by the commons class loader are located under the JONAS_ROOT/lib/commons directory. You can extend this class loader by adding your own JARs inside this directory. If you are using a Jetty packaging, JONAS_ROOT/lib/jetty will be loaded too.
![]() | Note |
---|---|
Note that the lib/ext extension mechanism is now deprecated. You should place additional JARs directly in the classloader directory (commons, apps, tools). |
To have a library available for each component running inside JOnAS, add the required JAR files in the JONAS_ROOT/lib/ext directory or in JONAS_BASE/lib/ext. The JARs in JONAS_BASE/lib/ext are loaded first, followed by the JARs in JONAS_ROOT/lib/ext. All JARs in subordinate directories will also be loaded.
If a specific JAR is needed only for a web application (that is, you need to use a version of a JAR file that is different than a version loaded by JOnAS), change the compliance of the web application classloader to the Java 2 delegation model. See Section 5.6.3 WEB Class Loader.