Red Hat JBoss Enterprise Application Platform 7.0 ( JBoss EAP 7) is a middleware platform built on open standards and compliant with the Java EE 7 specification.
It is derived from the upstream project Wildfly 10 and provides ready-to-use features such as high-availability clustering, messaging, and distributed caching.
JBoss EAP 7 is designed with a modular structure that allows on-demand services, thus greatly improving startup speed. Thanks to its web based management console and its powerful Command Line Interface (CLI), editing XML configuration files is unnecessary (and is even discouraged!). The CLI also adds the ability to script and automate management tasks. Internally, JBoss EAP includes APIs and development frameworks for quickly developing fast, secure, and scalable Java EE applications compliant with the Java EE 7 specification.
The first part of this book will let you conquer the management instruments and the EAP 7 domain configuration. When you have completed all green bars, we will concentrate on advanced topics, showing the improvements from the earlier release of the server.
As far as this chapter is concerned, we will now have a quick tour of its technology covering these topics:
What the installation options are and how to choose the one that works better for your context
How to perform the basic administration steps
The essentials of the server configuration
If you are arriving from a JBoss EAP 6 environment you will be eager to know about the highlights of the new platform. Broadly speaking, the changes encompass both the server administration area and the Java Enterprise APIs that can help to provide applications on it. We will start by introducing the new administrative features and then we will briefly mention the API highlights.
The administrative features are described as follows:
Undertow web server: JBoss Web has for quite a long time been the face of the web application server. Although compatible with Servlet/JSP Specifications it has kept the long-term legacy with Tomcat. The new Undertow web server has been built from scratch using the best-of-breed Java IO API. Some of its core features include non-blocking NIO based APIs, a lightweight and fully embeddable architecture based on pluggable handlers, and support for WebSockets, including JSR-356 and the HTTP Upgrade mechanism. Besides this, Undertow is capable of working as a reverse proxy or load balancer for a clustered application server, opening the door to the full JBoss clustering platform.
Simpler server management: Thanks to the HTTP upgrade mechanism available in Undertow, now you can reduce the number of ports in the default installation to just two:
* 8080 for applications with JNDI and EJB multiplexed
* 9990 for management, for both HTTP/JSON and native API
Support for HTTP/2: The new web server architecture supports the new version of the HTTP protocol, named HTTP/2. HTTP/2 aims to reduce latency and make efficient use of the TCP connection by means of binary framing, request/response multiplexing, header compression (HPACK) and more.
New life cycle modes: It is now possible to suspend and resume the execution of the application server. This allows active
sessions/requests/in-flight-txs
to complete and can be used for a graceful server shutdown scenario.Enhanced server management: The administration web console has been revamped with a new graphical layout and new availabilities such as the Datasource wizard that will let you quickly create database connections with a few touches.
ArtemisMQ Messaging Broker: In the new server version, the messaging broker has changed to ArtemisMQ which is directly derived from the former HornetQ. Former HornetQ clients will be supported out of the box, while offering compatibility to Apache's ActiveMQ 5.0 clients as well.
ORB Switch: The new version of the application server has switched to OpenJDK ORB which provides better interoperability with other vendors compared with the earlier JacORB implementation.
The Java EE 7 API highlights are related to the the Java EE 7 (JSR 342) specification is an umbrella specification which encompasses 33 single specifications. There have been brand new technologies and improvements of existing ones.
Here is a short list of Java EE 7 drivers:
JSR-352 batch applications for the Java platform, featuring a new API for an XML-based job specification language and a runtime API.
JSR-236 concurrency utilities for JavaEE, providing a simple and standard API for using multiple threads from Java Enterprise components.
JSR-353 Java API for JSON Processing (JSON-P). This API can be used to parse, transform, and query JSON data.
JSR-356 WebSockets support, featuring a full-duplex communication channel between the client and the server by means of simple annotations and life cycle callbacks.
Besides the new additions, some updates have been released to existing services. The most notable ones are as follows:
JSR-345, which includes EJB 3.2, plus Interceptors 1.2 and Annotations 1.2
JSR-340, featuring Servlet 3.1: non-blocking I/O, HTTP upgrade, and so on
JSR-342, including the JMS 2.0 API that delivers a JMSContext resource as a wrapper for JMS resources
JSR-344 JSF 2.2: HTML 5, FaceFlows, Stateless views, Resource lib contracts
Installing the application server can be done in several ways. For the purpose of learning we will start with the basic unzipping installation which will produce a vanilla installation ready to be used. In real-world scenarios with dozens of customized installations to be completed, you will probably want to learn some advanced installation tactics. Don't worry, we have been trained for it and you will be too in a while.
The first one we will detail is also the simplest, which merely requires unzipping a file. The JBoss EAP 7 ZIP file is available from the Red Hat Customer Portal. This method of installation is platform-independent and requires the following steps:
Open a browser and log into the Customer Portal at https://access.redhat.com.
Click Downloads.
Select Red Hat JBoss Enterprise Application Platform in the Product list and click on it.
In the next window, select the correct JBoss EAP version from the Version combobox and click Download .
JBoss EAP 7 is now downloaded to your target machine, ready for installation. Execute the following command in order to unzip the archive:
Now you can test that the installation was successful by executing the standalone.sh
shell script (Windows users will launch the standalone.cmd
equivalent).
Tip
When to use ZIP installation:
The ZIP installation can be used for developers or simple environments where it's just fine to provide a basic default installation of the server, with all the configuration and libraries in the standard folders. Therefore, it's not the best choice for large enterprise systems where you want to automate and customize installations.
This method of installation is peculiar of JBoss EAP and can be a practical solution if you want to manage your application ecosystem through Red Hat Packet Manager (RPM) archives.
Installing JBoss EAP 7 via RPM requires a subscription to the official Red Hat's repositories. You can either subscribe to the current JBoss EAP channel or a minor channel that provides a specific minor release and all applicable patches. This allows you to maintain the same minor version of JBoss EAP 7, while still staying current with high severity and security patches.
Let's see in practice how the installation can be done on a RHEL 7 operating system. First of all, we have to register our brand new server to the Red Hat Network (RHN), using our credentials (username/password) for accessing to all needed subscriptions.
The command will ask for username or password, or in case we've planned to use an internal RH Satellite 6 system, we can use a preconfigured Activation Key as an option:
After a successful registration we need to figure out to which Pool we need to attach for downloading the EAP 7 packages. We can use the subscription-manager list
command followed by the less one for searching through multiple subscriptions:
As soon as we find the right subscription (you should choose something like: JBoss Enterprise Application Platform) we have to take note of the pool ID and run the following:
After that we can explore the available repositories:
We won't list here all the available repositories which is quite large; however, you have to enable only EAP, RHEL7 base rpms, extras, and optional repository, and disable all the others with the following command:
You can verify that the process worked as expected by simply running the following:
The list should look like this:
Complete the installation by executing the following:
Tip
When to use RPM installation:
The RPM installation makes things a lot easier in terms of installation because you can use all the tools that know how to deal with RPMs, and upgrading is simpler because you can use yum to do it, especially for security errata. The JBoss RPMs put things where many RHEL system administrators would expect them: config
files under /etc
, content and libraries under /var
, and so on.
Most of the downsides come from being forced to do things the way RHN/RPMs want to do them. You cannot install multiple version of JBoss in parallel, which may not be an issue if you spin up a new VM per instance, but can be for some people. It is also difficult to install non-current versions, since you either need to manually specify the versions of several hundred packages or use satellite with a date cutoff on a custom cloned channel to hide any packages from newer releases.
The JBoss EAP 7 installer archive is also available from the Red Hat Customer Portal (https://access.redhat.com). The .jar
archive can be used to run either the graphical or text-based installers.
In order to complete the JAR installation, follow these steps:
Open a terminal and navigate to the directory containing the downloaded installation program JAR.
Type the following command:
As an alternative, if you have just a terminal available, use the text only mode by launching the following command:
We will not detail the single steps of the installation which are quite intuitive and covered by the EAP installation guide. Rather we would like to stress that the installer produces an XML script; you can reuse it for multiple installations, as you can see from the following picture:

If you open the generated XML file, then you can pinpoint some custom elements in the installation:
Then you can repeat the installation with the following command:
Tip
When to use the JAR installer:We would recommend using the JAR installer for medium to large sized environments where you have some common defaults for networks, database connectivity, or security settings. Another advantage of this approach is that it can be used for any operating system as it's completely Java based.
Downloading the source code can be used if you need low-level details about the single modules of the application server. Once you have downloaded the jboss-eap-7.0.0-src.zip
file, unzip it to your disk at first. Next you can build the server in two ways:
Executing the batch script (
build.sh
orbuild.bat
for Windows)If you have Maven 3.2.5 (or newer) installed you can use it directly as follows:
Change to the bin directory after a successful build:
Verify that the application server boots successfully:
The amount of installation options for EAP could well deserve one or more chapters; however, that would take us away from the scope of this book. We will just mention Ansible, which is an excellent configuration management and provisioning tool that uses SSH to perform administrative tasks on your machines. This has the evident advantage that nothing needs to be installed on the machines you are targeting as Ansible only runs on your main control machine, which could even be your laptop!
The steps used by Ansible to provision and configure machines are described in a kind of template called Playbooks, which are Ansible's configuration, deployment, and orchestration language.
You can find a large list of example Playbooks in the Ansible documentation, available at http://docs.ansible.com/ansible . Besides this, for testing purposes we have provided a sample EAP 7 playbook which is attached to the sources of this book. (Read the instructions contained in the README.txt
file packaged in ansible.zip
.)
Besides this, if you want a user interface for your provisioning activities, Ansible Tower is a web-based solution that makes Ansible even more easy to use for IT teams of all kinds. It's designed to be the hub for all of your automation tasks.