Chapter 22. Understanding class loaders 795
To solve this problem, you can break out just the few lines of Java code that load the native
code into a class on its own and place this file on WebSphere’s application class loader (in a
utility JAR file). However, if you deploy multiple such applications (EAR files) to the same
application server, you have to place the class file on the WebSphere extensions class loader
instead to ensure that the native code is loaded only once per JVM.
If the native code is placed on a reloadable class loader (such as the application class loader
or the WAR class loader), it is important that the native code can unload itself properly if the
Java code needs to reload. WebSphere has no control over the native code, ...