OSGi is a fundamental element in the technology stack of AEM. It is used to control the composite bundles of AEM and their configuration. OSGi “provides the standardized primitives that allow applications to be constructed from small, reusable and collaborative components.
OSGi is a Java framework for developing and deploying modular software programs and libraries. OSGi has two parts.
Bundles or Plug-in
Java Virtual Machine (JVM)-level service registry.
In this article, we will focus on bundle states only.
A Bundle object is the access point to define the lifecycle of an installed bundle. Each bundle installed in the OSGi environment must have an associated Bundle object.
A bundle must have a unique identity, a long, chosen by the Framework. This identity must not change during the lifecycle of a bundle, even when the bundle is updated. Uninstalling and then reinstalling the bundle must create a new unique identity.
A bundle can be in one of six states: