Application bundles are instance-specific, and each instance
of an application includes its own instance of the bundle. Shared
bundles are not instance-specific, and a single instance of a package
or service from a shared bundle can be used by many applications.
Shared bundles are further sub-divided into use bundles and provision
bundles.
Application bundles
Application bundles are
bundles that you create specifically for your application. They are
instance-specific or isolated; that is, they are not
intended to be shared. They are referenced in the application manifest
in the Application-Content header.
Shared bundles
Shared bundles are
not application-specific. A single instance of a package from a shared
bundle can be used by many applications. Shared bundles cannot import
packages or services from application bundles. Shared bundles in an
application must be provided by reference rather than contained directly
in an application.
Shared bundles are further subdivided into
use
bundles and
provision bundles:
- Use bundles
- A use bundle is a shared bundle that provides at
least one package to an application bundle. Use bundles are referenced
in the application manifest in the Use-Bundle header.
- Provision bundles
- A provision bundle is a shared bundle that provides
at least one package or service to an application bundle, a use bundle
or another provision bundle. Provision bundles are not referenced
in the application manifest, and your application does not know how
the requirement for each provision bundle is satisfied.
Bundle usage and bundle provisioning terminology
OSGi
bundles can be stored in any of the following locations:
- The enterprise bundle archive (EBA) file for the application.
- The WebSphere® Application
Server internal OSGi bundle repository.
- External OSGi bundle repositories.
Application bundles can be stored either
in the EBA file or in a repository. Shared bundles are
stored in a repository (otherwise they cannot be shared).
The
process of getting bundles from the repositories is known as
provisioning.
For provisioning purposes, the following terminology is used for bundles:
- Referenced bundles
- A referenced bundle is a bundle that is referenced
in the application manifest, and stored in a repository.
- Dependency bundles
- A dependency bundle is a bundle that is not referenced
in the application manifest, but that is used by bundles that are referenced
in the application manifest, or by other dependency bundles.
This is how the terminology for bundle usage
(that is,
application,
use and
provision
bundles) maps to the terminology for bundle provisioning (that
is,
referenced and
dependency bundles):
- Application bundles that are not directly contained
in the EBA file are instance-specific referenced bundles.
- Use bundles are shared referenced bundles.
- Provision bundles are shared dependency bundles.