Explain the life cycle of OSGI bundle?

Sharad Jaiswal
Sharad Jaiswal

Posted On: Dec 22, 2020


The OSGi Life-Cycle layer adds bundles that can be dynamically installed, started, stopped, updated, and uninstalled. Life cycle operations are fully protected with the security architecture.

You can say that the OSGi Life-cycle includes the following steps:


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.

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.

STARTING - A temporary state that the bundle goes through while the bundle is starting, after all, dependencies have been resolved. The BundleActivator.start method will be called and this method has not yet returned.

ACTIVE - The bundle is running. 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.

STOPPING - A temporary state that the bundle goes through while the bundle is stopping. The BundleActivator.stop method has been called but the stop method has not yet returned.

UNINSTALLED - The bundle has been removed from the OSGi container.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    AEM Interview Questions

    What is Adobe AEM?

    The full form of AEM is Adobe Experience Manager. It is a comprehensive content management solution for building websites, mobile apps, and forms. AEM makes it easy to manage your marketing content an...

    AEM Interview Questions

    What is AEM testing?

    AEM provides a testing framework named Bobcat for automating tests for your AEM UI. You can write and run UI tests directly in a web browser by using this framework that provides a Javascript API for ...

    AEM Interview Questions

    What is AEM Explorer?

    Sometimes, Application Explorer Missions is abbreviated as AEM Explorer which is designed for readers with low vision, physical challenges, and learning and attentional difficulties who may benefit fr...