Search code examples
websphereclassloader

Websphere: add shared shared library to cluster


I need to add a shared library to Websphere cluster. I have used the following approach - modified setupCmdLine.bat file this way

SET WAS_EXT_DIRS=%JAVA_HOME%\lib;%WAS_HOME%\classes;%WAS_HOME%\lib;%WAS_HOME%\installedChannels;%WAS_HOME%\lib\ext;%WAS_HOME%\web\help;%ITP_LOC%\plugins\com.ibm.etools.ejbdeploy\runtime;%EXTERNAL_LIB_DIR%

This makes it possible to add custom jars to %EXTERNAL_LIB_DIR% folder. But this works on a single server. How do I do it to entire cluster?


Solution

  • You should have not modified startupCmdLine. It is not the correct way in the cluster nor in the single server. Configure you shared library via admin console Environment > Shared libraries. If you want to associate that library with the cluster, you can select correct cluster in the Scope combo. Of course you will need to create directory with your shared jars on each node that is a member of the cluster and associate it with your application or server.

    Update
    To create server classloader go to Servers > Server Types > WebSphere application servers > server_name > Java and Process Management > Class loader and create new classloader, then attach library to it.

    See also: