You can define a shared library at the cell, node, or
application server level. Defining a library at one of the three levels
does not cause the library to be placed into the application server class
loader. You must associate the library with an application or server in
order for the classes represented by the shared library to be loaded in
either a server-wide or application-specific class loader.
Configuring shared libraries using the administrative
console
Open the administrative console to the Environment menu and choose the
Shared Libraries link. Here you will add the new shared library location
reference for enterprise applications to use. Once you create the
reference in the Shared Libraries, then the reference can be added to the
enterprise application. Go the Applications menu and choose the Enterprise
Applications link. This is where you pick the enterprise applications that
need this reference. After you click on the link for the specific
enterprise application then you will look at the Additional Properties in
the Config tab and click on the Libraries link. Here is where the
reference of the shared library is added to the specific application
server.
Files to look for:
The libraries.xml is created and located based on the scope. The file
will be created in the following location depending on scope:
- Application server level - the file will be located
in the $WAS_HOME/config/cells/<cell name>/nodes/<node
name>/servers/<specific server name> directory.
- Node level - the file will be located in the
$WAS_HOME/config/cells/<cell name>/nodes/<node name>
directory.
- Cell level - the file will be located in the
$WAS_HOME/config/cells/<cell name> directory.
The deployment.xml file for the enterprise application (located in the
$WAS_HOME/config/cells/<cell
name>/applications/name.ear/deployments/name.ear directory) that needs
the shared libraries information will have a tag similar to the following
added to the classloader section:
<classloader xmi:id="Classloader_1" mode="PARENT_FIRST">
<libraries xmi:id="LibraryRef_1" libraryName="sharelib"/>
</classloader>
Potential Problems:
Not Loading: The application server or enterprise application
that a shared library reference is mapped to needs to be recycled to load
the new classes.
Example: If you create a shared library reference and map this to an
application server that is running, it will need to be stopped and
restarted before the shared library files will be accessible. This also
applies when mapping to enterprise applications.
Save Changes: After you create the shared libraries reference
you will have to save the configuration to the master repository. At the
top menu bar press the Save link to save the configuration.
Note: if you are using the Network Deployment Manager administrative
console it is best to check Synchronize Nodes when saving to make sure the
information is propagated to all the nodes.
Synchronization: If you have nodes federated to a Network
Deployment Manager, the changes to a node need to be propagated from the
Network Deployment Manager by synchronizing. This can happen either
automatically, by waiting for a specified synchronization interval, or
manually by going to the System Properties and choosing the Nodes link.
Check the node you want and press either Synchronization or Full
Synchronization buttons. Now you should see the new configuration changes
to the node when looking in the $WAS_HOME/config directory.
Scope Level: Look at the "Scope Level: Cells=<cell
name>....". What the title of the scope level states is the location
where the modifications will happen. Even if you change the information
below the scope level title to point at the location you want, without
pressing the Apply button, changing the scope and scope title, the
modification will not be where you want them.
If You Still Have Problems: Run the collector tool and call
1-800-IBM-SERV for further support from IBM. Document the steps you did so
we can recreate this.
|