Adding a shared library to an enterprise application targeted for a WAS
Shared library allows you to specify a container-wide list of library entries that is used when deploying an application.
Prerequisite
- Create an enterprise application and target the server to a WebSphere® Application Server v6.0, or later.
To add share library use the WAS Deployment editor by completing the following steps:
- Switch to the Java™ EE perspective.
- The location of the WAS Deployment editor depends on the specification-level of your enterprise application project:
- If your enterprise application (EAR) project is at 1.2, 1.3 or 1.4 specification-level, complete the following steps:
- In the Enterprise Explorer view, expand your enterprise application project folder.
- Under the enterprise application project folder for which you want add or edit server configurations, double-click the
Deployment Descriptor to open the Application Deployment Descriptor editor.
- Select the
Deployment tab at the bottom of the editor.
Restriction: Before adding or removing J2EE modules, using the
Module page in the Application Deployment Descriptor editor, first click the
Deployment tab to activate the functions in the deployment page. Then add or remove your modules from the Module page. You need to complete this task for each Application Deployment Descriptor editor session that you want to add or remove modules from the Module page.
- If your enterprise application (EAR) project is at 5.0 specification-level, complete the following steps:
- In the Enterprise Explorer view, right-click your enterprise application project folder.
- Select
Java EE | Open WAS Deployment.
- Expand the shared library section.
- Click the
Add button beside the library list table. The Add Library Entry dialog box opens.
- In the add a library entry dialog box, specify the
name and either the
class path or
native path fields:
- In the
name field, specify the name for your library entry.
- In the
description field, you have the option to provide a brief description of the resource provider.
- In the
class path list box, browse or add the class path to the JAR files.
- In the
native path list box, browse or add a path which forms the location for the resource provider native libraries. Native path entries are separated by using the ENTER key and must not contain path separator characters (such as ';' or ':'). Native paths can contain variable (symbolic) names which you can substitute using a variable map.
- Save your changes and close the editor. The shared library entry has been added to the deployment descriptor files.