Referencing resources in other libraries

To include resources in your application, library, or integration service from other libraries, add references to those libraries.

About this task

The best way to make a resource available to multiple applications, libraries, or integration services is to store it in a shared library. For example, you might have some common error-handling code that you want to make available to multiple applications. You can store those common files in a shared library, then you can add a reference from your application to that shared library. A shared library can also reference another shared library. A shared library is deployed with or before the container that refers to it. If you update the contents of that library and redeploy it, those changes are available to all containers that refer to the library.

For examples of how to use shared libraries to share resources between multiple solutions, see the following topics:

If you reference a static library from an application, that static library is embedded in the application at deployment time. The library is effectively private and is not accessible to other applications or message flows outside the referring application.

A static library can reference another static library only. Similarly, a shared library can reference another shared library only.

The following steps describe how to add library references.

Procedure

  1. In the Application Development view, right-click an application, library, or integration service and click Manage library references.
  2. Select the libraries that you require and click OK.
    If the libraries that you select refer to other libraries, those dependent libraries are shown.
  3. To check which resources will be deployed with your solution, look at the Prepare tab of the BAR file editor. When you expand the application, integration service, or library, library references are listed.

What to do next

To remove a reference to a library, right-click an application, library, or integration service and click Manage library references. Clear the check box next to the library references that you want to remove and click OK.