Red Hat Training

A Red Hat training course is available for Red Hat JBoss Enterprise Application Platform

JBoss EAP 简介

Red Hat JBoss Enterprise Application Platform 7.1

适用于 Red Hat JBoss Enterprise Application Platform 7.1

Red Hat Customer Content Services

摘要

本文档提供了 Red Hat JBoss Enterprise Application Platform 的高层次概念性概述以及 JBoss EAP 所基于的几个主题。

第 1 章 一般概念概述

在了解如何配置和部署 Red Hat JBoss Enterprise Application Platform 之前,必须先了解一些重要概念。

1.1. Java

Java 是一种编程语言,也是一个计算平台,它结合了面向对象、类和并发等概念。Java 应用程序编译成字节代码,在 Java 虚拟机 (JVM) 中运行。

1.2. 应用服务器

应用服务器(app 服务器)是提供 web 应用程序运行环境的软件。大多数 app 服务器还通过一组 API,为在其环境中运行的 web 应用程序提供功能。例如,app 服务器可提供用于连接数据库的 API。

1.3. Java EE 7

Java EE(Java 平台企业版)是一个基于标准的企业级平台,可为运行与开发 Java 应用程序提供 API 和运行时环境。其目标在于,提供丰富的企业级功能,方便利用框架消除样板代码并减轻技术负担,从而提高开发人员的生产率。Java EE 的构成框架都经过大量的组合测试。Java EE 7 基于 JSR 342,是 Java EE 6 的后继版本,主要侧重于进一步简化用于访问容器服务的 API,同时增强对 HTML5 等新兴 web 技术的支持。

Java EE 7 includes support for profiles, or subsets, of APIs. The Java EE 7 specification defines the full platform and the Web Profile.

Java EE 7 Web Profile

The Java EE 7 Web Profile is designed for web application development and supports a subset of the APIs defined by Java EE 7 related web-based technologies.

Java EE 7 Full Platform

The Java EE 7 full platform contains all of the APIs defined by Java EE 7, including all the items in the Web Profile. When developing EJBs, messaging applications, and web services (in contrast to web applications), use the full platform.

第 2 章 JBoss EAP 概述

2.1. 关于 JBoss EAP 7

Red Hat JBoss Enterprise Application Platform (JBoss EAP) 7.1 is a certified implementation of the Java Enterprise Edition (Java EE) 7 full platform and Web Profile specifications.

JBoss EAP 的主要版本是从 WildFly 社区项目分支而来,分支时该社区项目已达到理想的功能完整度。在分支后又经过了长期的测试和产品化,JBoss EAP 在此期间内达到稳定、通过认证并得到增强,从而可供生产性使用。在 JBoss EAP 主要版本的生命周期内,可能会从该社区项目中拣选出一些选定的功能,并向后移植到同一主要版本体系中的一系列功能增强次要版本中。例如,JBoss EAP 7.1 就是从 WildFly 11 的一个工作分支中分出。

JBoss EAP 提供了预配置的功能选项,比如,高可用性集群、消息和分布式缓存。它还支持用户使用 JBoss EAP 提供的各种 API 与服务来编写、部署和运行应用程序。

JBoss EAP 采用模块化结构,服务仅在需要时才会启用,从而提高了启动速度。基于 web 的管理控制台和管理命令行界面 (CLI) 不需要编辑 XML 配置文件,而且增加了编写脚本并自动执行任务的功能。此外,JBoss EAP 还包括用于快速开发安全、可扩展 Java EE 应用程序的 API 和开发框架。

表 2.1. JBoss EAP 的功能

功能描述

符合 Java EE 7 规范

Java Enterprise Edition 7 full platform and Web Profile certified.

受管域

集中管理多个服务器实例和物理主机,而独立服务器只允许运行单个服务器实例。可以按服务器组来管理配置、部署、套接字绑定、模块、扩展和系统属性。集中并简化应用程序安全性(包括安全域)管理。

管理控制台和管理 CLI

新的域或独立服务器管理界面。管理 CLI 还包括批处理模式,可以编写脚本并自动执行管理任务。不建议直接编辑 JBoss EAP XML 配置文件。

简化的目录结构

模块目录包含所有应用服务器模块。域和独立目录分别包含用于域和独立部署的构件与配置文件。

模块化类加载机制

模块可以按需加载和卸载。这样可提高性能、实现更好的安全性并缩短启动和重启时间。

简化数据源管理

数据库驱动程序可像其他服务一样进行部署。另外,可以使用管理控制台和管理 CLI 来创建和管理数据源。

2.2. 子系统

许多对部署到 JBoss EAP 的应用程序开放的 API 和功能组成子系统。管理员可根据应用程序的目标,配置这些子系统来提供不同的特性。例如,如果应用程序需要数据库,则可在 datasources 子系统中配置数据源,在应用程序部署到 JBoss EAP 服务器或域之后,就可以访问该数据源。

2.3. 高可用性

JBoss EAP 中的高可用性 (HA) 是指多个 JBoss EAP 实例一起协同运行,使应用程序能更好地抵抗流量、服务器负载和服务器故障等方面的波动。HA 结合了可扩展性、负载均衡和容错性等概念。

2.4. 操作模式

除了向应用程序提供相关功能和 API 之外,JBoss EAP 还具备强大的管理功能。JBoss EAP 采用不同的操作模式启动,可以分别提供不同的管理功能。JBoss EAP 提供独立服务器操作模式用于管理分散的实例,提供受管域操作模式用于从单个控制点管理一组实例。

第 3 章 实例

以下几个示例说明了 JBoss EAP 的工作方式以及它在不同环境中所处的位置。

3.1. 简单示例

intro example simple

本示例演示了一种简单的 JBoss EAP 设置。JBoss EAP 实例中部署了两个应用程序。另外它还配置为使用 datasources 子系统与数据库进行连接,并使用旧式的 security 子系统或 elytron 子系统与 Kerberos 服务器进行连接。这些连接对已部署的应用程序开放。JBoss EAP 实例通过 undertow 子系统处理请求并将这些请求定向到相应的应用程序。应用程序使用由 JBoss EAP 开放的 API 连接到数据库和 Kerberos 服务器,执行它们实现的业务逻辑。在执行完成后,应用程序会通过 undertow 子系统向请求者发回应答信息。

3.2. 扩展示例

intro example expanded

本示例演示了一种更为复杂的配置,涉及安排在受管域中的三个 JBoss EAP 实例,具有一个负载均衡器或 web 服务器。这三个实例还配置为通过使用 mod_cluster 的负载均衡和使用 Infinispan 的会话复制来支持高可用性。所有三个 JBoss EAP 实例都部署了 web 应用程序、web 服务和 EJB。一个 JBoss EAP 实例通过 messaging-activemq 子系统配置了 JMS 队列。所有三个 JBoss EAP 实例都通过数据源连接到数据库。它们还使用旧式的 security 子系统或 elytron 子系统连接到 LDAP 服务器。此外,一个 JBoss EAP 实例配置为通过 messaging-activemq 子系统连接到外部消息代理。这些所配置的连接对部署到相应实例中的应用程序、web 服务、EJB 和 JMS 队列开放。

所有针对应用程序、web 服务或 EJB 的传入请求会首先由负载均衡器或 web 服务器接收。根据所配置的负载均衡算法和由每个 JBoss EAP 实例所提供的信息,web 服务器或负载均衡器将请求定向到相应的 JBoss EAP 实例。JBoss EAP 实例通过 undertow 子系统处理请求并将这些请求定向到相应的应用程序。应用程序使用由 JBoss EAP 开放的 API 连接到数据库和 Kerberos 服务器,执行它们实现的业务逻辑。在执行完成后,应用程序会通过 undertow 子系统向请求者发回应答信息。任何非持久的信息(例如会话信息)都会通过 infinispan 子系统在 JBoss EAP 实例之间传播。





Revised on 2018-07-09 09:02:36 EDT

法律通告

Copyright © 2018 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.