Java Reference
In-Depth Information
refresh
Installed
Stopping
update
stop
uninstall
Resolved
Active
stop
uninstall
start
Uninstalled
Starting
Figure A.6 Bundles may move between the installed, resolved, starting, active, and stopping states. A
starting bundle can be lazily activated, and if so it won't move to the active state (crossing the dashed
line) until it's needed by another bundle. A bundle is resolved if it's installed and all its dependencies are
also resolved or started. When a bundle is uninstalled, it's no longer able to start, nor can it provide
packages to any new bundles.
the bundle is started or stopped. The activator class is declared in the bundle mani-
fest as follows:
Bundle-Activator: com.supermarket.Activator
Although they're widely used and handy in core OSG i, bundle activators aren't such a
common pattern in enterprise OSG i. Chapter 6 demonstrates how Blueprint allows
you to do everything you can do with an activator, but in a much more flexible and
powerful way.
A.4.3
Installation and resolution
Installation is the process by which new bundles are added to an existing OSG i frame-
work at runtime. This can be done in a number of framework-specific ways, but there's
a commonly used, framework-independent mechanism for installing a bundle from
any local or remote location.
The BundleContext can be used to install a bundle using a string URL that points
to a bundle file somewhere in the ether, as follows:
org.osgi.framework.BundleContext.installBundle(String location)
Search WWH ::




Custom Search