IBM Support

Enabling sharedlib feature for WAS Community Edition v3.0.0.0

Flash (Alert)


The shared library feature is to provide a common directory where you can install class files and JAR files that can be shared by multiple Java EE assets. It may be a convnient way for the developers to keep their classes or libraries while developing Java EE asset.


To add shared library feature into WAS Community Edition Server, Please refer this instruction:
1. Unzip the attached file into the WAS Community Edition installation directory, and ensure the files listed in the zip file replace the ones in the server installation.

2. Update <WAS_CE_HOME>\var\config\config.xml to add 2 modules information like this

<module name="org.apache.geronimo.configs/sharedlib-extender/3.0-w20110721/car"/>
<module name="org.apache.geronimo.configs/sharedlib/3.0-w20110721/car"/>

3. Start the server with the cache cleaned, for example,
<WAS_CE_HOME>\bin\startup.bat -c
<WAS_CE_HOME>/bin/ -c

Finally, you can use the shared library feature. The default shared library location is <WAS_CE_HOME>\var\shared\. If you prefer to put the shared libraries at any other location of your file system, define them with a SharedLib GBean. For example,

<gbean name="SharedLib" class="org.apache.geronimo.system.sharedlib.SharedLib">
<attribute name="baseDir">var/shared</attribute>
<attribute name="classesDirs">classes</attribute>
<attribute name="libDirs">lib</attribute>
<reference name="ServerInfo">

Note that you need to define a new attribute called "baseDir" in your SharedLib GBean definition, the "classDirs" and "libDirs" are all relative to the "baseDir" location.

About the detail usage of sharedlib feature, you can refer the instruction from WAS Community Edition 2.1.1.x documentation ->

Related information

Shared Library Usage Guide

Document information

More support for: WebSphere Application Server Community Edition

Software version:

Operating system(s): AIX, Linux, Solaris, Windows

Software edition: Elite, Enhanced, Entry

Reference #: 1575706

Modified date: 03 December 2012

Translate this page: