Book Image

Mastering Java EE Development with WildFly

By : Luca Stancapiano
Book Image

Mastering Java EE Development with WildFly

By: Luca Stancapiano

Overview of this book

Packed with rich assets and APIs, Wildfly 10 allows you to create state-of-the-art Java applications. This book will help you take your understanding of Java EE to the next level by creating distributed Java applications using Wildfly. The book begins by showing how to get started with a native installation of WildFly and it ends with a cloud installation. After setting up the development environment, you will implement and work with different WildFly features, such as implementing JavaServer Pages. You will also learn how you can use clustering so that your apps can handle a high volume of data traffic. You will also work with enterprise JavaBeans, solve issues related to failover, and implement Java Message Service integration. Moving ahead, you will be working with Java Naming and Directory Interface, Java Transaction API, and use ActiveMQ for message relay and message querying. This book will also show you how you can use your existing backend JavaScript code in your application. By the end of the book, you’ll have gained the knowledge to implement the latest Wildfly features in your Java applications.
Table of Contents (20 chapters)
5
Working with Distributed Transactions
16
WildFly in Cloud

Infinispan

The clustering in WildFly 10 is managed by Infinispan 8.2.4. This project was born in the JBoss community; when it started, it was called JBoss Cache. JBoss Cache/Infinispan has been the cluster library of the JBoss application server since the JBoss 4.x version.

Infinispan is a distributed cache project. It is based on an internal memory in which we can put some kind of data so that it can be distributed in a wide net of nodes where Infinispan is installed and configured.

By default, Infinispan connects all nodes in the same subnet in one group of data. The same achievement happens in WildFly. As an example, we can try to start WildFly 10 in different nodes using the standalone.sh command, deploy a web application, and monitor what happens.

The standalone.sh file in the bin directory of WildFly allows us to choose a starting configuration. We will start an initial...