When you need to use the same Java™ classes in multiple solutions, store those Java classes in a shared library. You can access the Java classes in the shared library by using JavaCompute nodes in your applications.
If you update those Java classes and redeploy the shared library, those changes are automatically available to all applications that reference that shared library. You do not need to redeploy the referencing applications.
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 class loader is created for that shared library. This class loader contains all Java classes in the shared library, as well as the Java classes from all referenced shared libraries. Java classes in shared library class loaders are isolated from Java classes in the integration server-wide class loader.
A Java class can exist in multiple class loaders if that Java class is contained in a shared library that is referenced by other shared libraries. When you update that Java class by redeploying the shared library that contains it, all class loaders for all shared libraries that contain that Java class are deleted and re-created.
If you include a JavaCompute node in a subflow in a shared library, that node can access the Java classes in that shared library and any referenced shared libraries. If you include a JavaCompute node in a flow or subflow in an application, that node can access the Java classes in a shared library and any shared libraries that are referenced by that shared library. In this case, you must specify a shared library qualifier in the form {shlib1} as the Java configurable service. Java classes in applications, static libraries, or independent projects cannot access Java classes in shared libraries.
The order in which you create your resources is flexible. The following steps describe one way to share Java classes between multiple applications.
You can deploy your resources by dragging the shared library and the applications onto the integration server. If you use this method, you must deploy the shared library before the applications that reference it. Alternatively, you can add the applications and shared library to a BAR file, then deploy that BAR file.