Book Image

JBoss: Developer's Guide

By : Elvadas Nono Woguia
Book Image

JBoss: Developer's Guide

By: Elvadas Nono Woguia

Overview of this book

Have you often wondered what is the best JBoss product to solve a specific problem? Do you want to get started with a specific JBoss product and know how to integrate different JBoss products in your IT Systems? Then this is the book for you. Through hands-on examples from the business world, this guide presents details on the major products and how you can build your own Enterprise services around the JBoss ecosystem. Starting with an introduction to the JBoss ecosystem, you will gradually move on to developing and deploying clustered application on JBoss Application Server, and setting up high availability using undertow or HA proxy loadbalancers. As you are moving to a micro service archicture, you will be taught how to package existing Java EE applications as micro service using Swarm or create your new micro services from scratch by coupling most popular Java EE frameworks like JPA, CDI with Undertow handlers. Next, you will install and configure JBoss Data grid in development and production environments, develop cache based applications and aggregate various data source in JBoss data virtualization. You will learn to build, deploy, and monitor integration scenarios using JBoss Fuse and run both producers/consumers applications relying on JBoss AMQ. Finally, you will learn to develop and run business workflows and make better decisions in your applications using Drools and Jboss BPM Suite Platform.
Table of Contents (10 chapters)

Load balancing with an Undertow subsystem

Considering the fact that we have two running undertow instances, we will configure a WildFly application server Undertow subsystem to act as a load balancer in the following section.
Start two instances of the beosbank-undertow-service project using the following:

$mvn exec:java -Dundertow.port=7071
$mvn exec:java -Dundertow.port=7072

Download, install, and run a WildFly application server in standalone mode:

unzip $HOME/Downloads/wildfly-11.0.0.Alpha1.zip
cd wildfly-11.0.0.Alpha1/bin
$ ./standalone.sh

WildFly is now running and listening on port 9990; connect to the server using jboss-cli, as follows:

./jboss-cli.sh --connect

For Undertow to act as a static load balancer behind a set of backend systems, we must register remote socket bindings for these backend systems:

[standalone@localhost:9990 /] /socket-binding-group=standard-sockets...