Introduction

This chapter briefly describes the OSGi technology.

1. Overview

OSGi, a technology defined by the OSGi Alliance, consists of a set of specifications for a dynamic component system designed for Java. An application compatible with the OSGi specifications is composed of small, reusable components that are dynamically composed. These components, referred to as bundles, communicate with each other through Java objects known as OSGi services, which are managed by the OSGi service registry.

For more information about the OSGi technology, refer to http://www.osgi.org. This website provides useful information about the specifications that constitute the OSGi technology, as well as Javadoc for API.

2. OSGi Framework

The OSGi framework is a fundamental element in the OSGi specifications. It provides scalability with bundles and enables stable management and deployment of downloadable application components.

Main functions provided by the OSGi framework are as follows.

  • The framework manages the lifecycle of bundles. The bundle, a unit of managing the OSGI framework, is a JAR file that records property values defined by the OSGi specifications in the META-INF/Manifest.MF file. The OSGI framework itself is a bundle and the OSGi framework bundle is called System Bundle.

  • The framework manages dependency between bundles, and wire them if necessary. Each bundle describes required and available packages and versions in Manifest.MF according to the OSGi specifications. The OSGi framework use the information to identify dependencies between bundles and wire them.

  • The framework manages the services provided by bundles. In the context of OSGi, a service refers to a general Java object that offers specific functionalities. Each bundle registers its services in the service registry, which is managed by the OSGi framework, or utilizes the registered services by using the methods described in the OSGi specifications.

3. Overview of JEUS OSGi

The JEUS OSGi module provides an environment where JEUS, a Jakarta EE-based web application server, can create and use OSGi framework instances. The following describes the functions provided by the JEUS OSGi module.

  • The OSGi framework instances can be created and started according to the configuration when starting the server.

  • Application can approach the OSGI framework bundles through JNDI.

  • The status of the OSGi framework can be checked, and OSGi bundles can be installed, started, stopped, resumed, or removed.

  • Web applications are enabled to access services managed by the OSGi framework.