Associating shared libraries with servers


 

+

Search Tips   |   Advanced Search

 

We can associate shared libraries with the class loader of a server. Classes represented by the shared library are then loaded in a server-wide class loader, making the classes available to all applications deployed on the server.

This page assumes that we have defined a shared library. The shared library represents a library file used by multiple deployed applications.

To associate a shared library with the class loader of a server, create and configure a library reference using the admin console.

A library reference specifies the name of the shared library file.

If we associate a shared library with a server class loader, do not associate the same shared library with an application.

  1. Set class loaders for applications deployed on the server.

    1. Go to...

      Servers | Server Types | WebSphere application servers | server_name

      to access the appserver setting page.

    2. Set values for the application Class loader policy and Class loading mode of the server.

  2. Create a library reference for each shared library file that the application needs.

    1. In the admin console, click...

      Servers | Server Types | WebSphere application servers | server_name | Java and Process Management | Class loader | class_loader_ID

    2. Click Shared library references to access the Library reference page.

    3. Click Add.

    4. On the library reference settings page, name the library reference. The name identifies the shared library file that the application uses.

    5. Click Apply. The name of the library reference is shown in the list on the Library reference page.

    Repeat the previous steps until you define a library reference for each shared library that the application needs.

 

What to do next

To verify that an application can use a shared library, test the application or examine the class loader in the Class loader viewer. Go to...

Troubleshooting | Class loader viewer | module_name | Table View

The classpath of the application module class loader lists the classes used by the shared library.

 

Related tasks

Class loaders
Create shared libraries
Associating shared libraries with applications or modules

 

Related

Shared library collection
Library reference collection