Java Reference
In-Depth Information
What is a missing dependency?
The notion of a missing dependency is a little subjective. It boils down to your inter-
pretation of what makes up the application and what makes up your server runtime.
At its heart, a missing dependency is a package import, or for servers that offer OSGi
service-based provisioning, a service dependency, made by a Subsystem-Content
bundle that isn't satisfied by another bundle within the subsystem content. Some
people argue that if this dependency is supplied by the server runtime rather than a
shared library bundle, then the dependency isn't missing; however, as server run-
times differ, a dependency may be missing on one server but not on another. This
scenario is the main reason that even though ESAs are portable artifacts, they still
have to be redeployed if moved to a different server environment.
This is the point at which resolution and provisioning can become quite intertwined, and
is the reason why many people struggle to understand the difference. If an ESA specifies
a version range for its application content, then how are you ever going to find its depen-
dencies—you don't even know which bundles to start with!
In essence, the resolver and the provisioner have to work together to provide a
deployment for an ESA . The resolver typically only needs access to the metadata for a
bundle, not the entire archive, so a typical resolver will generate a model from the meta-
data of the bundles available in a repository. This is a comparatively small amount of
information, but provides the resolver with a complete description of all the bundle
dependencies. The resolver can then use this information to calculate a resolved set of
bundles for the ESA . This will include all of the application content bundles and any
other bundles obtained via a repository to match missing dependencies (see figure 4.4).
Application bundle
Import-Package: fancyfoods.logging
Resolved
dependency
Export-Package: fancyfoods.logging
Import-Package: common.logging.framework
Second order
dependency
Export-Package: common.logging.framework
Figure 4.4 If you want to install this application bundle into a framework, then you need to ensure that
the fancyfoods.logging package is available. This is provided by a bundle that has a dependency
on the common.logging.framework package, which must also be satisfied by the resolution process.
In this case, you pull in a third bundle that can supply the package and has no further missing dependencies.
Search WWH ::




Custom Search