Book Image

Mastering JBoss Enterprise Application Platform 7

By : Francesco Marchioni, Luigi Fugaro
Book Image

Mastering JBoss Enterprise Application Platform 7

By: Francesco Marchioni, Luigi Fugaro

Overview of this book

The JBoss Enterprise Application Platform (EAP) has been one of the most popular tools for Java developers to create modular, cloud-ready, and modern applications. It has achieved a reputation for architectural excellence and technical savvy, making it a solid and efficient environment for delivering your applications. The book will first introduce application server configuration and the management instruments that can be used to control the application server. Next, the focus will shift to enterprise solutions such as clustering, load balancing, and data caching; this will be the core of the book. We will also discuss services provided by the application server, such as database connectivity and logging. We focus on real-world example configurations and how to avoid common mistakes. Finally, we will implement the knowledge gained so far in terms of Docker containers and cloud availability using RedHat's OpenShift.
Table of Contents (20 chapters)
Mastering JBoss Enterprise Application Platform 7
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface

Preface

JBoss Application Server has been, de facto, the open source platform to provision enterprise Java applications. The commercial platform that supported the release of the application server is JBoss Enterprise Application Platform (JBoss EAP), which has just hit its 7th release.

This release contains the advanced features developed for the upstream project—now called WildFly Application Server (currently at version 10)—such as the newly designed web subsystem, Undertow, which uses the latest non-blocking I/O features of Java to provide improved scalability and performance. Undertow also supports the latest standards for web applications, such as HTTP/2, HTTP Upgrade, and WebSockets.

Another change in the application server platform is the messaging subsystem, which is now based on the unified messaging technology for Red Hat products, called Apache ActiveMQ Artemis. Active MQ Artemis enables customers to exchange messages between JBoss EAP 6 and 7, while preserving the performance, scalability, and reliability of the EAP 6's HornetQ.

JBoss EAP 7 also features several significant management updates by giving administrators the ability to see and manage the configuration of JBoss EAP servers offline, or using the new server suspend mode to gracefully shut down the servers only after completing the in-flight transactions.

The preceding list is a non-exhaustive collection of features that will be discussed throughout this book, which will guide you through the core aspects of the Enterprise server, focusing on practical use cases and describing how to solve common issues.

What this book covers

Chapter 1, Installation and Configuration, introduces you to the application server platform and provides details about the installation, available server modes, and the management instruments (Web console  and CLI).

Chapter 2, The CLI Management Tool, describes how you can configure and manage your JBoss EAP 7 platform using the CLI, using its auto completion feature, offline mode, and script files.

Chapter 3, Managing EAP in Domain Mode, goes in depth with the application server management using the domain mode, showing how to design advanced domain configurations and handle disaster and recovery scenarios.

Chapter 4, Deploying Applications, explains the different ways you can deploy your applications. Either by CLI, Web console, or filesystem, all a deployment's life cycle is managed by the platform itself and for both standalone and domain mode.

Chapter 5, Load Balancing, is about balancing requests to EAP 7 servers from a Web frontend layer.

Chapter 6, Clustering EAP 7, goes in depth to support and better configure your environment by providing a fault tolerant system with failover capabilities.

Chapter 7, Logging, provides a comprehensive description of the logging services available in the application server, teaching you how to build a scalable logging system.

Chapter 8, Configuring Database Connectivity, explains how to configure a datasource using the CLI. Adding a JDBC driver, defining a connection pool, choosing between an XA and a non-XA Datasource, and hardening the configuration is all described in depth.

Chapter 9, Configuring EAP 7 for Java EE Applications, describes how to configure the services needed for server-side applications through the application server subsystems.

Chapter 10, Messaging Administration, goes in detail about message-oriented middleware and how the JBoss EAP 7 platform can help rely on Apache Artemis as its default implementation.

Chapter 11, Securing the Application Server, discusses securing the application server infrastructure, including the applications running on top of it.

Chapter 12, New Security Features of EAP 7 , is a preview of the upcoming security features available in the EAP 7.1 release and how to centralize security concerns of Web applications with the Red Hat Single Sign-On (SSO) server.

Chapter 13, Using EAP 7 with Docker, shows how to use the Docker technology to provision EAP 7 in the Enterprise.

Chapter 14, Running EAP 7 on the Cloud Using OpenShift, shows how applications leverage the new Red Hat PaaS (based on Docker and Kubernetes) to scale automatically and in any environment.

What you need for this book

To fully benefit from this book, you first need a PC, possibly running a Linux-like system, with at least 4 GB of RAM and around 10 GB of free disk space. Also, an Internet connection is a must.

From a software point of view, you will need JDK 8 and, of course, JBoss EAP 7.x. Furthermore, you should install Git and Maven.

Who this book is for

Java system administrators, developers, and application testers will benefit from this book. You are not expected to have accumulated a lot of experience on the earlier versions of the application server, though you must know the basic concepts of the Java and Linux operating system.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include directive."

A block of code is set as follows:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><AutomatedInstallation langpack="eng"><productName>EAP</productName><productVersion>7.0.0</productVersion><com.izforge.izpack.panels.HTMLLicencePanel id="HTMLLicencePanel"/>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

import socket
socket.setdefaulttimeout(3)
newSocket = socket.socket()
newSocket.connect(("localhost",22))

Any command-line input or output is written as follows:

cd jboss-eap-7.0
cd bin
$ ./standalone.sh

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "In the next window, select the correct JBoss EAP version from the Version combobox and click Download. "

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from https://github.com/mjbeap7 or from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from http://www.packtpub.com/sites/default/files/downloads/MasteringJBossEnterpriseApplicationPlatform7_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.