此内容没有您所选择的语言版本。

Chapter 5. Introduction to OSGi


Abstract

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

Overview

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

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.