Shared library settings


 

+

Search Tips   |   Advanced Search

 

To make a library file available to deployed applications...

Environment | Shared libraries | shared_library_name

Scope

Level of the location of the shared library configuration file.

On single-server installations, the shared library has its configuration file in a location that pertains to the cell, node, or server level.

On multiple-server installations, the shared library has its configuration file in a location that pertains to the cell, node, server, or cluster level.

Data type String

Name

Name for the shared library.

Data type String

Description

Describes the shared library.

Data type String

Classpath

List of paths that WAS searches for classes and resources of the shared library.

If a path in the list is a file, WAS searches the contents of that JAR or zip file. If a path in the list is a directory, then WAS searches the contents of JAR and zip files in that directory.

For performance reasons, WAS searches the directory itself only if the directory contains subdirectories or files other than JAR or zip files.

Press Enter to separate class path entries. Entries must not contain path separator characters such as a semicolon (;) or colon (:). Class paths can contain variable names that can be substituted using a variable map.

Data type String
Units Class path

Native library path

Class path for locating platform-specific library files for shared library support; for example, .dll, .so, or *SRVPGM objects.

If we specify a value for Native library path, the native libraries are not located by application or shared library class loaders unless the following conditions exist:

  • A class loads the native libraries.

  • The application invokes a method in this class which loads the libraries.

    For example, in the class that loads the native library, call System.loadLibrary(native_library) in a static block:

    static {System.loadLibrary("native_library");

  • The Classpath specified on this page contains the class that loads the libraries.

Native libraries cannot be loaded more than once by a class loader. Thus, it is preferable for native libraries to use an isolated shared library or to be loaded within shared libraries associated with the class loader of an appserver. See the Use an isolated class loader for this shared library setting.

Data type String
Units Class path

Use an isolated class loader for this shared library

Whether the shared library has a single isolated shared library shared across its associated applications or Web modules.

New feature: An isolated shared library enables one instance of the library classes to be shared only among associated applications and Web modules. An isolated shared library enables multiple applications or Web modules to share a common set of classes across a subset of the applications.

Further, an isolated shared library supports versioning and loads the minimum number of library copies. The class loader created for an isolated shared library does not reload and, like a server class loader, exists for the lifetime of a server. For shared native libraries, we can use an isolated shared library to avoid errors resulting from reloading of native libraries

The default, false, is not to isolate the shared library so that each application loads its own instances of the shared library classes.

Use an isolated shared library can reduce the memory footprint when a large number of applications share the library. If we select this option, associate the shared library with applications or Web modules.

Restriction: If we associate the shared library with a server, WAS ignores this setting and still adds files in the shared library to the appserver class loader. WAS ND v7.0 does not use an isolated shared library when you associate the shared library with a server. To use an isolated shared library, associate the shared library with applications or Web modules.

Selecting this option affects the class loader order of the associated application or Web module. If the class loader order for a class loader associated with an isolated shared library is Classes loaded with the parent class loader first (Parent first), the class loader checks whether a class can be loaded in the following order:

  1. Checks whether the associated library class loaders can load the class.

  2. Checks whether its parent class loader can load the class.

  3. Checks whether it (application or WAR module class loader) can load the class.

If the order is Classes loaded with the local class loader first (Parent last), the class loader checks in the following order:

  1. Checks whether it (application or WAR module class loader) can load the class.

  2. Checks whether the associated library class loaders can load the class.

  3. Checks whether its parent class loader can load the class.

This setting maps to the isolatedClassLoader Boolean attribute of the Library object.

Boolean false





 

Related tasks

Manage shared libraries
Set native libraries in shared libraries

 

Related

Class loading exceptions