You must deploy the necessary shared libraries before you deploy the applications that
use them.
Procedure
-
Create a directory to contain the necessary shared libraries. You can use one directory to
contain all libraries or multiple if you want to break up which libraries are in which scope. It is
recommended to keep the files in the config directory to make sure they are synchronized with the
cluster members. For example this path:
<DMgr Profile>/config/cells/<cell name>/clusters/<cluster_name>/<shared
lib directory>.
Note: Avoid having your share libraries in other locations (like /lib/ext/)
for the cluster members.
-
Create an environment variable for the shared library path at the cluster scope, which you can
find in the administrative console under , for example SHARED_LIB_PATH with a value of
${USER_INSTALL_ROOT}/config/cells/<cell_name>/clusters/<cluster_name>/<shared lib
directory>.
Note: Using this structure ensures the path is correct on each cluster member.
-
Create the shared library at the cluster scope by using the variable for the class path, which
you can find in the WebSphere administrative console under .
-
Choose whether you will be associating your shared library with the server classloader or the
classloader for your applications.
- Add the shared library to each application cluster member server:
- Create a class loader for the server by selecting .
- Add the shared library to the classloader which you have created.
For more information, see Associating shared libraries with
servers in the WebSphere Application
Server
documentation.
- Add the shared library to each application. With this method you will be mapping the shared
library to specific application modules either during deployment or after deployment. For more
information, see Associating shared libraries with
applications or modules in the WebSphere Application
Server
documentation.
-
After creating the shared library or when you must modify the files in the shared library,
perform these steps:
- Add the necessary library files to the shared directory in the deployment manager
configuration.
- Perform a full node synchronization so the files are propagated to all the nodes.
- Restart the cluster members to pickup the changes.
What to do next
Now you can use the shared libraries in your applications. When deploying applications with
shared libraries, see Deploying Advanced applications that use shared libraries.