Create shared libraries

To make a library file available to multiple applications deployed on a server, create shared libraries.

We can create one shared library that points to multiple files or directories, enabling us to maintain a single shared library for required files, or we can create a shared library for each library file. The latter approach is recommended only if there are only a handful of library files, applications that use the files. After creating a shared library, you associate it with each application that uses the library files. If we have multiple shared libraries and multiple applications that use the library files, you must complete many steps to create and associate those shared libraries. It is simpler to use one shared library for related files.

Go to...

On the shared library settings page, specify the name, class path, and any other variables for the library file that are needed, including any native libraries.

To have only one instance of a version of a class shared among applications or modules, make the shared library an isolated shared library. Select...

Using an isolated shared library can reduce the memory footprint when a large number of applications share the library.

Next, associate the shared libraries with specific applications or modules, or with the class loader of an application server. Associating a shared library file with a server class loader associates the file with all applications on the server.

If we enabled...

...associate the shared library with applications or web modules. By default, shared libraries configured to use an isolated class loader cannot be associated with server-level class loaders. To override this behavior for a specific shared library, add...

...as a generic JVM argument to the server JVM settings, or unselect the Use an isolated class loader for this shared library setting. When set, libraries associated with the server class loader do not use an isolated class loader.

Alternatively, we can use an installed optional package to associate the shared libraries with an application.


Subtopics


Related concepts

Installed optional packages
  • Associate shared libraries with applications or modules
  • Associate shared libraries with servers
  • Manage shared libraries
  • Use installed optional packages
  • Shared library collection