IIB-Libraries-Demo

Rathod Bupender


Introduction

                  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 Integration Bus:

            1. Shared libraries and 

            2. Static libraries.

Audience

This document is intended for Eidiko’s Training team, Support teams Business users and other. The purpose of this document is to provide a detailed guide, intended for Eidiko IT teams, to understand the operations. 

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.

🡪 Shared libraries are represented by the shared library icon  PIC.png

🡪 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 shared library can refer to other shared libraries only.

The Process of Creating shared Library in toolkit.

Click on File->New🡪Library

 Give the name of Library, select the Library Type and click on finish.

You can now see the below under application development.

Click on new and create a flow or sub flow Based on the requirement, In the Lab I am creating Sub Flow.

give the name of sub flow and click on finish

You can see the sub flow will be created.


Inserted the compute node for doing the business logic.

Now we can give the shared Library as a reference to any application, here is how we can give reference to shared library, Right click on the application and Select manage Library Referene.

Select the Library which you want to give reference and click on Ok.

You can see the below referenced Library

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 PIC.png

🡪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 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 Integration Toolkit and the web user interface. Libraries that are referenced by applications are displayed directly beneath the application in the IBM Integration Toolkit. You can also view deployed libraries by using the IBM 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 table summarizes the differences between static and shared libraries:-

 

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.


The Process of Creating Static Library in toolkit.

Click on File->New🡪Library







Give the name of Library, select the Library Type and click on finish.

You can now see the below under application development.

Click on new and create a flow or sub flow Based on the requirement, In the Lab I am creating Sub Flow.

give the name of sub flow and click on finish

You can see the sub flow will be created.


Inserted the compute node for doing the business logic.

Now we can give the shared Library as a reference to any application, here is how we can give reference to shared library, Right click on the application and Select manage Library Referene.

Select the Library which you want to give reference and click on Ok.

You can see the below referenced Library



 


 


Comments