Chapter 5. Introduction to OSGi

download PDF


The OSGi specification supports modular application development by defining a runtime framework that simplifies building, deploying, and managing complex applications.

5.1. Red Hat JBoss Fuse


Red Hat JBoss Fuse has the following layered architecture:
  • Technology layer—includes technologies such as JAX-WS, JAX-RS, JMS, Spring, and JEE
  • the section called “Red Hat JBoss Fuse” —a wrapper layer around the OSGi container implementation, which provides support for deploying the OSGi container as a runtime server. Runtime features provided by the JBoss Fuse include hot deployment, management, and administration features.
  • OSGi framework —implements OSGi functionality, including managing dependencies and bundle lifecycles

Red Hat JBoss Fuse

Figure 5.1 shows the architecture of JBoss Fuse.

Figure 5.1. Red Hat JBoss Fuse Architecture

Red Hat JBoss Fuse Architecture
JBoss Fuse is based on Apache Karaf, a powerful, lightweight, OSGi-based runtime container for deploying and managing bundles to facilitate componentization of applications. JBoss Fuse also provides native OS integration and can be integrated into the operating system as a service so that the lifecycle is bound to the operating system.
As shown in Figure 5.1, JBoss Fuse extends the OSGi layers with:
  • Console— an extensible Gogo console manages services, installs and manages applications and libraries, and interacts with the JBoss Fuse runtime. It provides console commands to administer instances of JBoss Fuse. See the "Console Reference".
  • Logging—a powerful, unified logging subsystem provides console commands to display, view and change log levels. See "Configuring and Running JBoss Fuse".
  • Deployment—supports both manual deployment of OSGi bundles using the osgi:install and osgi:start commands and hot deployment of applications. When a JAR file, WAR file, or OSGi bundle is copied into the hot deployment folder InstallDir/deploy, it's automatically installed on-the-fly inside the Red Hat JBoss Fuse runtime. When you update or delete these files or bundles, the changes are made automatically (but only while the container is running!). See Section 7.1, “Hot Deployment”.
  • Provisioning—provides multiple mechanisms for installing applications and libraries. See Chapter 8, Deploying Features.
  • Configuration—the properties files stored in the InstallDir/etc folder are continuously monitored, and changes to them are automatically propagated to the relevant services at configurable intervals.
  • Spring DM—simplifies building Spring applications that run in an OSGi framework. When a Spring configuration file is copied to the hot deployment folder, Red Hat JBoss Fuse generates an OSGi bundle on-the-fly and instantiates the Spring application context.
  • Blueprint—is essentially a standardized version of Spring DM. It is a dependency injection framework that simplifies interaction with the OSGi container—for example, providing standard XML elements to import and export OSGi services. When a Blueprint configuration file is copied to the hot deployment folder, Red Hat JBoss Fuse generates an OSGi bundle on-the-fly and instantiates the Blueprint context.
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.