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
- 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® Integration Bus: shared libraries and static libraries.
- 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 . Shared libraries are represented by the shared library icon .
A shared library can refer to other shared libraries only. Similarly, a static library can refer to other static libraries only.
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.
mqsilist integrationNodeName -e integrationServerName -y sharedLibraryName
The following animation illustrates the difference between a static and shared library.Download mp4 file
|Shared library||Static library|
|Support for libraries||Shared libraries are introduced in IBM Integration Bus Version 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.|