Blog Articles

In this series of article, I will present several ways to deploy an application on an EAP Domain. The series consists of four parts. Each one will be a standalone article, but the series as a whole will present a range of useful topics for working with JBoss EAP.

In part one of this series, we set up a simple JBoss EAP Domain. In part two, we reviewed the EAP Management Console deployment Mechanism and deployed the helloworld-html5 EAP Quickstart on the main-server-group( Server11 and Server21). In part three, we deployed helloworld-html5 on secondary-server-group using the CLI Command line.

In this tutorial, part four, we are going to explore another deployment option: the REST Management API. To do so, we will upload a file in the EAP content repository and then deploy it.

Management Interfaces

On the master domain controller, we set up two management interfaces: the native on port 9999, and the HTTP management interface on port 9990.

While the CLI uses the native management port, and the EAP management console and the REST API are available on the HTTP management port, all these management interfaces also share common XML configuration files: host.xml/domain.xml. They also send commands to EAP using an intermediate representation called DMR ( Dynamic Model Representation).

Everything you need to grow your career.

DMR

DMR stands for Dynamic Model Representation, and it is a new syntax introduced with EAP 6 to denote Java objects associated with EAP Management interfaces. DMR is flatter than XML files and all the items are at the same level. Let’s check out a sample:

The EAP Configuration is made up of a DMR tree, and using the CLI you can navigate through the entire configuration: deployments, server-groups, subsystems and modules, hosts… you can even update the DMR tree with specific operations.

This command deploys the application on instance server 23, the only member of the singleton-server-group, and enables it. Remember server 23’s HTTP port is 8580

The application is now deployed on the five servers, and this concludes our chapter on deployment. We now know how the different deployment options can be used, depending on our projects requirements.

The REST API is interesting if we have a continuous integration tools like Jenkins on some WebHooks to trigger deployments after the builds, but DMR is clearly easier for scripting and the command line.