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:
- Start the administrative console.
- In the topology tree, expand Environment and click Shared Libraries.
- On the Shared Libraries page, specify the scope for which you want to define a library and click Apply.
- Click New.
- Specify a name and classpath for the shared library. You can also specify other properties on this page.
- Click OK.
- Save the configuration.
Modify shared libraries
To modify a shared library, follow these steps:
- Start the administrative console.
- In the topology tree, expand Environment and click Shared Libraries.
- On the Shared Libraries page, specify the scope contains the library that you want to modify and click Apply.
- Click the name of the shared library that you want to modify.
- Make your changes.
- Click OK.
- Save the configuration.
Remove shared libraries
To remove a shared library, follow these steps:
- Start the administrative console.
- In the topology tree, expand Environment and click Shared Libraries.
- On the Shared Libraries page, specify the scope for that contains the library that you want to remove and click Apply.
- Select the checkbox for the shared library that you want to remove.
- Click Delete.
- Save the configuration.
Associate a shared library with an application server
To associate a shared library with an application server, follow these steps:
- Start the administrative console.
- In the topology tree, expand Servers and click Application Servers.
- On the Application Servers page, click the name of the server to which you want to add a shared library.
- On the application server's detail page, click Classloader.
- On the Classloader page, click New.
- Select the Classloader mode and click OK.
- 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.
- On the classloader's detail page, click Libraries.
- On the Libraries page, click Add.
- Select the shared library that you want to associate with your application server.
- Click OK.
- Save the configuration.
To remove an association to a shared library, follow these steps:
- On the Libraries page, select the checkbox for the library that you want to remove.
- Click Remove.
- Save the configuration.
Associate a shared library with an application
To associate a shared library with an application, follow these steps:
- Start the administrative console.
- In the topology tree, expand Applications and click Enterprise Applications.
- On the Enterprise Applications page, click the name of the application to which you want to add a shared library.
- On the application's detail page, click Libraries.
- On the Libraries page, click Add.
- Select the shared library that you want to associate with your application.
- Click OK.
- Save the configuration.
To remove an association to a shared library, follow these steps:
- On the Libraries page, select the checkbox for the library that you want to remove.
- Click Remove.
- Save the configuration.