Last updated Dec 8, 2017

Lifecycle of a bundle

OSGi is a dynamic platform. This means that bundles may be installed, started, updated, stopped, and uninstalled at any time during the running of the framework.

The table below shows the possible states of an OSGi bundle and how these map to the plugin states.

Status of OSGi Bundle

Description

INSTALLED

The bundle has been installed into the OSGi container, but some of the bundle's dependencies have not yet been met. The bundle requires packages that have not been exported by any currently installed bundle.

Plugin status: Disabled.

RESOLVED

The bundle is installed, and the OSGi system has connected up all the dependencies at a class level and made sure they are all resolved. The bundle is ready to be started. If a bundle is started and all of the bundle's dependencies are met, the bundle skips this state.

Plugin status: Disabled.

STARTING

A temporary state that the bundle goes through while the bundle is starting, after all dependencies have been resolved.

Plugin status: Disabled.

ACTIVE

The bundle is running.

Plugin status: Disabled while Spring is doing its stuff. Spring scans the Spring configuration and builds the context,

then hands the context to the plugin. The plugin needs the context in order to create instances of each plugin module.
Enabled once Spring has handed the context to the plugin.

STOPPING

A temporary state that the bundle goes through while the bundle is stopping.

Plugin status: Disabled.

UNINSTALLED

The bundle has been removed from the OSGi container.

Plugin status: Disabled.

Behind the Scenes in the Plugin Framework Common Coding Tasks

Rate this page: