The OSGi Alliance is an independent organization responsible for defining the features and capabilities of the OSGi Service Platform Release 4. The OSGi Service Platform is set of open specifications to simplify building, deploying, and managing complex software applications.
OSGi technology is often referred to as the dynamic module system for Java. OSGi is a framework for Java that uses OSGi bundles to modularly deploy Java components and handle dependencies, versioning, classpath control, class loading, and more. OSGi's lifecycle management allows you to load, start, and stop bundles without shutting down the JVM.
OSGi provides the best runtime platform for Java, a superior class loading architecture, and a registry for services. Bundles can export services, run processes, and have their dependencies managed. Each bundle can have its requirements managed by the container.
Apache ServiceMix Kernel uses Apache Felix as its OSGi implementation. Apache Felix is a community effort to implement the OSGi release 4 service platform, which includes the OSGi framework and standard services, as well as other OSGi-related technologies.
FUSE ESB Kernel can also use any standard OSGi container, for example, Equinox. The Framework layers form the container into which your install bundles. The Framework manages the installation and updating of bundles in a dynamic, scalable manner and manages the dependencies between bundles and services.
As shown in Figure 1.1, the OSGi Framework contains the following layers:
Bundles — Logical modules that together comprise an application. See OSGi Bundles.
Service layer — Provides communication among modules and their contained components. The OSGi Service Layer defines a dynamic collaborative model that is highly integrated with the Lifecycle Layer. See OSGi Services.
Lifecycle layer — Provides access to the underlying OSGi framework to handle the lifecycle of individual bundles so you can manage your application dynamically, including starting and stopping bundles. See Lifecycle Management
Module layer — Provides an API to manage bundle packaging, dependency resolution, and class loading. See Packaging OSGi Bundles.
Execution environment — A configuration of a JVM; it uses well defined profiles that define the environment in which bundles can work.
Security layer — Optional layer based on Java 2 security with additional constraints and enhancements. For more information, see Security layer and Securing OSGi Bundles.
Each layer in the Framework depends on the layer beneath it. For example, the Lifecycle layer requires the Module layer; the Module layer can be used without the Lifecycle and Service layers.