0

How can a resource, for example a jar, be made available to all applications on the server?

aleksander_si
  • 1,021
  • 10
  • 28

1 Answers1

0

The following resources describe the procedure:

Shared libraries https://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/cwlp_sharedlibrary.html

Providing global libraries for all Java EE applications https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_classloader_global_libs.html

Liberty: Directory locations and properties https://www.ibm.com/support/knowledgecenter/en/SS7K4U_liberty/com.ibm.websphere.wlp.zseries.doc/ae/rwlp_dirs.html

On Windows, the globally shared folder path would be:

C:\IBM\WebSphere\Liberty\usr\shared\config

This is the folder where the jars must be copied. It is important to note that even if the jars are added in the config folder above, they may not be used due to class loader settings. In that case, follow the instruction:

In the following example, an application called Scholar is configured to use a common library called Alexandria, and also to use the global library.

In the server.xml file, or an included file, enable the global library for an application by adding the following code:

<application id="" name="Scholar" type="ear" location="scholar.ear">
  <classloader commonLibraryRef="Alexandria, global" />
</application>
aleksander_si
  • 1,021
  • 10
  • 28
  • Answers that are essentially just links are not desirable. I suggest importing the operative/basic parts of the configruation. – covener Jul 17 '19 at 11:17