Shared library settings
Make a library file available to deployed applications.
From the admin console, click 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.
Information Value Data type String
Name
Name for the shared library.
Information Value Data type String
Description
Describes the shared library.
Information Value Data type String
Classpath
List of paths that the product searches for classes and resources of the shared library.
If a path in the list is a file, the product searches the contents of that JAR or compressed .zip file.
If a path in the list is a directory, then the product searches the contents of JAR and compressed files in that directory.
For performance reasons, the product searches the directory itself only if the directory contains subdirectories or files other than JAR or compressed files.
For example, if the directory /mainstay, which contains the alpha.jar file, is specified in the classpath definition, then the library's classpath would be /mainstay/alpha.jar. If /mainstay also contains a non-jar file, or a subdirectory, then the library's classpath would be /mainstay:/mainstay/alpha.jar.
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.
Information Value 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 application server. See the Use an isolated class loader for this shared library setting.
Information Value Data type String Units Class path
Use an isolated class loader for this shared library
Specifies whether the shared library has a single isolated shared library shared across its associated applications or web modules.
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, the product ignores this setting and still adds files in the shared library to the application server class loader. The product does not use an isolated shared library when you associate the shared library with a server. To use an isolated shared library, we must associate the shared library with applications or web modules.
Select 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:
- Checks whether the associated library class loaders can load the class.
- Checks whether its parent class loader can load the class.
- 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:
- Checks whether it (application or WAR module class loader) can load the class.
- Checks whether the associated library class loaders can load the class.
- Checks whether its parent class loader can load the class.
This setting maps to the isolatedClassLoader Boolean attribute of the Library object.
Information Value Boolean false
Manage shared libraries Configure native libraries in shared libraries Class loading exceptions