Monday, 19 December 2016

OSGI Lifecycle

Since Liferay has adopted OSGI standards it is necessary for us to know basic's of OSGI.

OSGI-stands for  Open Services Gateway initiative.

OSGI is a Java framework for developing and deploying dynamic modular software applications. 

Basic OSGI Module Lifecycle

OSGI Lifecycle includes following states

  1. Installed
  2. Resolved
  3. Starting
  4. Active
  5. Stopping
  6. UnInstalled
Fig shows OSGI Module Lifecycle


1) Installed


The bundle has been installed into the OSGi container, but some required bundle dependencies is missing.A bundle in this state can’tbe start.
2) Resolved

When bundle is in resolved state means all the required 
dependencies is available.And bundle is ready to be started.

3) Starting

Bundle is being started and BundleActivator.start() method is 
executed.
Bundle with lazy activation policy stay in this state until one of 
class file is loaded.It is state between resolved and active.

4) Active 

The bundle is active and running.

5) Stopping

Bundle is being stopped & BundleActivator.stop() method is 
executed.After stopping state is complete it again enters in to resolved state,Once enter in resolved state it can again started.

6) UnInstalled

Bundle has been removed from osgi container.

Other Useful Post


For Spring boot,Spring microservices,Spring MVC,Spring Batch,Hibernate please refer 

For Java - Java 8 please refer Java Tutorial


Thanks

No comments:

Post a Comment