Sharing common OSGi bundles for Liberty
You can share common OSGi bundles by placing them in a local directory or remote repository and configuring the server.xml file for your server, so that those common OSGi bundles are available to your OSGi applications.
Local Directory
Procedure
Remote Repository
You can access bundles held in a remote OSGi repository which supports the OSGi Bundle Repository (OBR) format.
Procedure
Add the following lines into your server.xml file.
<bundleRepository location="URL" />
Where URL points to the location
of an OBR XML file. The following protocols are supported:- HTTP
- HTTPS
- file
Note: If you specify a relative file URL, then it is treated as being relative to the value of
${server.config.dir}
and resolved to a local OBR XML file.You can define
a remote and local repository at the same time using both a location attribute and nested fileset
tags within the same bundleRepository
entry.