Book Image

Hands-On Cloud Development with WildFly

By : Tomasz Adamski
Book Image

Hands-On Cloud Development with WildFly

By: Tomasz Adamski

Overview of this book

The book starts by introducing you to WildFly Swarm—a tool that allows you to create runnable microservices from Java EE components. You’ll learn the basics of Swarm operation—creating microservices containing only the parts of enterprise runtime needed in a specific case. Later, you’ll learn how to configure and test those services. In order to deploy our services in the cloud, we’ll use OpenShift. You’ll get to know basic information on its architecture, features, and relationship to Docker and Kubernetes. Later, you’ll learn how to deploy and configure your services to run in the OpenShift cloud. In the last part of the book, you’ll see how to make your application production-ready. You’ll find out how to configure continuous integration for your services using Jenkins, make your application resistant to network failures using Hystrix, and how to secure them using Keycloak. By the end of the book, you’ll have a functional example application and will have practical knowledge of Java EE cloud development that can be used as a reference in your other projects.
Table of Contents (14 chapters)

Thin and hollow JARs

As we said before, during the standard Maven plugin operation, the resulting application contains both the Swarm server and the application that is deployed on it. We can change that behavior. Let's suppose that we deploy our application in the cloud and later push new changes to its code. Since it is the application code that changes in most cases, we would like to create the container with the server in the cloud and later push only code to it. How are we able to do it? By using hollow JARs.

Using hollow JARs

You are able to configure the Maven plugin to build hollow JARs, which contain the swarm server without the actual application deployed on it. Let's return to the JAX-RS + CDI example...