Creating a library

Create a library to contain a logical grouping of related code, data, or both, that can be reused.

About this task

The order in which you create resources is flexible. You can begin by creating an application and adding resources to it, or you can begin by creating libraries of resources, then create an application that refers to them. Libraries are optional; create one if you want to reuse resources.

Two types of library exist in IBM® Integration Bus: shared libraries and static libraries. A shared library can be deployed directly to an integration server or in a BAR file with referencing applications. If that shared library is updated, the changes are immediately available to all applications or shared libraries that refer to it.

A static library is deployed with the application that references it. 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.

A static library is the original container that was introduced in WebSphere® Message Broker Version 8.0. In IBM Integration Bus Version 10.0 and later, the preferred way to share resources is to store them in a shared library. If you want each application to use a different version of the contained resource, you can use a static library.

For more information about libraries, see Libraries.

Procedure

To create a library, complete the following steps.

  1. Open the New Library wizard by using one of the following methods in the IBM Integration Toolkit:
    • Click File > New > Library.
    • In the Application Development view, click New, then click Start by creating a library.
    • Right-click the white space in the Application Development view, then click New > Library.
  2. Enter a name for the library.
  3. Select either Shared Library or Static Library.
  4. If this library is the first one to be created, click Finish. If another library exists, you can click Next to add a reference to an existing library.
  5. Optional: If you click Next, existing libraries are listed. Select the existing libraries that you want to reference from the new library.
    A shared library can reference other shared libraries only; a shared library cannot reference a static library. Similarly, a static library can reference other static libraries only. If you add a reference to a static library that refers to other static libraries, all referenced static libraries are included.
  6. Click Finish.

Results

A library is created and is shown in the Application Development view. You can expand the library to view library references. Shared libraries are represented by the shared library icon Icon for a shared library. Static libraries are represented by the static library icon Icon for a static library. A shared library that is referenced by an application or another shared library is shown in the Referenced Libraries folder for that application or shared library. A static library that is referenced by an application or another static library is shown in the Included Libraries folder for that application or static library.

What to do next