Class Loading in WmAppPlat
The following diagram displays how classes are loaded for web applications, running on WmAppPlat. From top to bottom, the OSGi host bundle (org.apache.catalina) is extended by a set of fragment bundles (including the pls-web-is bundle), which are parent to the Tomcat WebAppClassLoader, which is parent to your web applications.
The following table describes each classloader:
Classloader | Description |
OSGi host bundle | This classloader is created for the org.apache.catalina bundle. |
fragment bundles | A composite set of fragment bundles extends the complete classpath of the OSGi host bundle. The pls-web-is bundle is part of this bundle set. |
org.apache.catalina.loader. WebappClassLoader | This classloader is parent to the deployed web applications. |
webappN | Each web application has its own classloader, which resolves resources in its context. |
Fragment bundles have the following declaration in the manifest.mf file: Fragment-Host: org.apache.catalina. You can share third-party libraries across your web applications by creating a wrapper bundle with this declaration. This will ensure that any code that is executed in the OSGi host bundle or any fragment bundle will have access to the package imports and exports.