Java isolation

When you add Java™ code to an application, Java isolation is enabled by default. To make Java code available to multiple applications, store the Java code in a shared library.

Java in applications

Versions 8 and 9 of IBM® Integration Bus did not support Java isolation in applications. All Java that was deployed to the execution group was loaded into a single class loader, which was used by all JavaCompute nodes in all applications. This behavior precluded the use of duplicate classes.

When you create an application in Version 10 or later, Java isolation is enabled by default. For each application, a Java class loader is built that contains only the Java that is deployed in that application and any included static libraries.

You can enable and disable Java isolation for individual applications by setting the Java Isolation configuration property on the Manage tab of the BAR file editor. To see whether Java isolation is enabled for the applications that have been deployed to an integration server, use the web user interface or the mqsilist command. For example:
mqsilist integrationNodeName -e integrationServerName -d 2

Java in shared libraries

You can store Java files in shared libraries. JAR files are packaged inside shared libraries. Java classes that are deployed in a shared library are not available to the integration server wide class loader. When you deploy a shared library that contains Java files, a new classloader is created for that shared library.

Java classes in the integration server wide classloader are isolated from the Java classes in any shared library classloaders. Similarly, Java classes in shared library classloaders are isolated from Java classes in the integration server wide classloader.

Java classes in applications, static libraries, or independent projects cannot access Java classes in shared libraries.

For more information about storing Java files in shared libraries, see Shared libraries and Java files.