Administer shared libraries

WebSphere Application Server - Express uses shared libraries to define code that is used by your enterprise applications, but not packaged within those applications. For example, a utility library, such as IBM Toolbox for Java classes, could be packaged as a shared library. Shared libraries can be associated with an enterprise application or an application server. If you assoicate a shared library with an application server, it is accessible to all of the enterprise applications deployed on that server.

Shared library files in WebSphere Application Server consist of a symbolic name, a classpath, and a path for loading JNI libraries.

You can define a shared library at the cell, node, or server level. Defining a library at one of the three levels does not cause the library to be placed into the application server's classloader. To make the classes in the library available to an application or server, you must create an association between the library and the application or server.

A separate classloader is used for shared libraries that are associated with an application server. This classloader is the parent of the application classloader, and the WebSphere Application Server extensions classloader is its parent. Shared libraries that are associated with an application are loaded by the application classloader. For more information about classloaders, see Classloader hierarchy.

For information on administering shared libraries, see these sections:

Create shared libraries

To create a shared library, follow these steps:

  1. Start the administrative console.
  2. In the topology tree, expand Environment and click Shared Libraries.
  3. On the Shared Libraries page, specify the scope for which you want to define a library and click Apply.
  4. Click New.
  5. Specify a name and classpath for the shared library. You can also specify other properties on this page.
  6. Click OK.
  7. Save the configuration.

Modify shared libraries

To modify a shared library, follow these steps:

  1. Start the administrative console.
  2. In the topology tree, expand Environment and click Shared Libraries.
  3. On the Shared Libraries page, specify the scope contains the library that you want to modify and click Apply.
  4. Click the name of the shared library that you want to modify.
  5. Make your changes.
  6. Click OK.
  7. Save the configuration.

Remove shared libraries

To remove a shared library, follow these steps:

  1. Start the administrative console.
  2. In the topology tree, expand Environment and click Shared Libraries.
  3. On the Shared Libraries page, specify the scope for that contains the library that you want to remove and click Apply.
  4. Select the checkbox for the shared library that you want to remove.
  5. Click Delete.
  6. Save the configuration.

Associate a shared library with an application server

To associate a shared library with an application server, follow these steps:

  1. Start the administrative console.
  2. In the topology tree, expand Servers and click Application Servers.
  3. On the Application Servers page, click the name of the server to which you want to add a shared library.
  4. On the application server's detail page, click Classloader.
  5. On the Classloader page, click New.
  6. Select the Classloader mode and click OK.
  7. On the Classloader page, click the classloader that you created. If this is the first classloader that you create for your application server, it is named classloader_1.
  8. On the classloader's detail page, click Libraries.
  9. On the Libraries page, click Add.
  10. Select the shared library that you want to associate with your application server.
  11. Click OK.
  12. Save the configuration.

To remove an association to a shared library, follow these steps:

  1. On the Libraries page, select the checkbox for the library that you want to remove.
  2. Click Remove.
  3. Save the configuration.

Associate a shared library with an application

To associate a shared library with an application, follow these steps:

  1. Start the administrative console.
  2. In the topology tree, expand Applications and click Enterprise Applications.
  3. On the Enterprise Applications page, click the name of the application to which you want to add a shared library.
  4. On the application's detail page, click Libraries.
  5. On the Libraries page, click Add.
  6. Select the shared library that you want to associate with your application.
  7. Click OK.
  8. Save the configuration.

To remove an association to a shared library, follow these steps:

  1. On the Libraries page, select the checkbox for the library that you want to remove.
  2. Click Remove.
  3. Save the configuration.