Libraries

A library is a logical grouping of related code, data, or both. A library typically contains reusable helper routines and resources such as subflows, ESQL modules, message definitions, maps, and Java™ utilities. You can use a library to group resources of the same type or function, and to aid the management and reuse of such resources

Consider using libraries for the following functions:
  • To group common types of resource (such as all your ESQL routines)
  • To group resources by function (such as all your error-handling routines)
  • To share routines and definitions across multiple teams or projects
  • To use different versions of a coherent set of routines and definitions

Two types of library exist in IBM® App Connect Enterprise: shared libraries and static libraries.

Consider a scenario when you want to develop a set of common resources and make them available to multiple applications.
Shared libraries
If you want to deploy and manage just one copy of those common resources, use a shared library. A shared library can be deployed directly to an integration server. Any application can reference the resources in that deployed shared library. If that shared library is updated, the changes are immediately visible to all referencing applications.
Static libraries
If you want each application to use a different version of the contained resource, use a static library. Each application that references that static library is deployed with its own private copy of that library. If a static library is updated, each application that references it must be repackaged and redeployed with the updated static library.

Static libraries are represented by the static library icon Icon for a static library. Shared libraries are represented by the shared library icon Icon for a shared library.

A shared library that is referenced by an application or another shared library is shown in the Referenced Libraries folder of the application or shared library.
A static library that is referenced by an application or another static library is shown in the Included Libraries folder of the application or static library.

A shared library can refer to other shared libraries only. Similarly, a static library can refer to other static libraries only.

Libraries that are deployed to an integration server are displayed directly beneath the integration server in the IBM App Connect Enterprise Toolkit and the web user interface. Libraries that are referenced by applications are displayed directly beneath the application in the IBM App Connect Enterprise Toolkit. You can also view deployed libraries by using theIBM Integration API or the mqsilist command, for example:
mqsilist integrationNodeName -e integrationServerName -y sharedLibraryName
In this example, the command lists the resources that are deployed in a shared library, the integration server to which that shared library is deployed, and any applications that refer to the shared library.

The following animation illustrates the difference between a static and shared library. Video that explains the difference between static and shared librariesVideo that illustrates the difference between a static and shared library.This video demonstrates the difference between a static and shared libraryDownload mp4 file

The following table summarizes the differences between static and shared libraries.
  Shared library Static library
Support for libraries Shared libraries are introduced in IBM Integration Bus 10.0. The libraries that were introduced in WebSphere® Message Broker Version 8.0 are renamed as static libraries.
Referencing libraries If multiple applications reference a shared library, when the applications are deployed, each application uses the artifacts directly from the deployed shared library. If multiple applications reference a static library, when the applications are deployed, each application has its own private copy of the library and the resources that are contained in it.
Updating libraries If you update and redeploy a shared library, all applications that reference that shared library see the updates automatically. If you update a static library, you must repackage and redeploy each application that references that library, unless applications need to use different versions of that library.
Deploying libraries Shared libraries can be deployed directly to the integration server, or they can be deployed in the same BAR file as the applications that reference them. If a shared library is deployed in a BAR file, it can still be used by applications or shared libraries in other deployed BAR files. Static libraries are packaged and deployed in the same BAR file as the applications that reference them.
For more information, see the following topics: