JBoss EAP 7 Domain deployments – Part 4: Domain deployment with REST Management API.

In this blog series we will present several ways to deploy an application on an EAP Domain. The series consists of five 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 setup 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 checked how to deployedhelloworld-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).

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 domain.xml configuration section containing EAP profiles and server groups looks like this:

<profiles>
 <profile name="default">
   ....
 </profile>
 <profile name="ha">
   ....
 </profile>
 <profile name="full">
   ...
 </profile>
 <profile name="full-ha">
   ...
 </profile>
 </profiles>

 <server-groups>
 <server-group name="primary-server-group" profile="full">
   ...
 </server-group>
 <server-group name="secondary-server-group" profile="full">
   ...
 </server-group>
 <server-group name="singleton-server-group" profile="default">
   ...
 </server-group>
</server-groups>..

And the DMR representation of this same XML looks like this:

...
"profile" => {
 "default" => undefined,
 "ha" => undefined,
 "full" => undefined,
 "full-ha" => undefined
 },
 "server-group" => {
 "primary-server-group" => undefined,
 "secondary-server-group" => undefined,
 "singleton-server-group" => undefined,
 },
...

Continue reading “JBoss EAP 7 Domain deployments – Part 4: Domain deployment with REST Management API.”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

JBoss EAP 7 Domain deployments – Part 2: Domain deployments through the EAP 7.0 Management Console

In this blog series we will present several ways to deploy an application on an EAP Domain. The series consists of 5 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.

  • Part 1: Setup a simple EAP 7.0 Domain.
  • Part 2: Domain deployments through the new EAP 7.0 Management Console (this article)
  • Part 3:  Introduction to DMR (Dynamic Model Representation) and domain deployments from the Common Language Interface CLI.
  • Part 4: Domain deployment from the REST Management API.
  • Part 5: Manage EAP 6 Hosts from EAP 7.0 domain

In part 1 of this series on JBoss EAP 7 Domain deployments, we set up a simple EAP 7.0 domain with three hosts:

Review the domain Configuration

The domain controller host0, and two slaves hosts running several EAP 7.0 instances.

JBoss EAP Simple Domain

In the following tutorial we are going to see how to deploy an application on JBoss EAP domain using the new EAP 7.0 Management Console.

Continue reading “JBoss EAP 7 Domain deployments – Part 2: Domain deployments through the EAP 7.0 Management Console”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Offline CLI with JBoss EAP 7

Over the years, I’ve come across many command line interfaces (CLI) to larger applications, each with varying levels of access and power. Having a CLI at all is a great first step for an application, as it opens up a much wider range of possibilities: administration, extension, and trust.

CLIs also promote scriptability – the ability to create and maintain repeatable scripts, and the easier it is to develop said scripts, the better. Sometimes scripts can solve issues that developers of the app never thought of. (Pro tip: find good user experience designers who know the product and are comfortable on the command line, then put them in charge of the CLI user experience. Your users will love you.

Continue reading “Offline CLI with JBoss EAP 7”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Maven mirrors on OpenShift with and without Source to Image (S2I)

velocimetroI’m guessing if you’ve done enough repeated builds on OpenShift, using Maven, that you are probably aware of the “download the internet” phenomenon that plagues build times. You start a build, expecting all those Maven dependencies you downloaded for your last build to be re-used, but quickly see your network traffic ramp up while the same 100MB of jars are downloaded again and again. Even builds of a few minutes tend to grind on me, frustrate me as a developer when I’m trying to test/deploy/fix quickly.

Thankfully, Maven has a nice feature that allows you to set up local mirrors that cache dependencies and make them available to future builds, only updating from the upstream repo as needed on a regular (and configurable) schedule.

Continue reading “Maven mirrors on OpenShift with and without Source to Image (S2I)”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 


For more information about Red Hat OpenShift and other related topics, visit: OpenShift, OpenShift Online.

Continuous Development with Automated Testing

Automated testing is one of the hardest, but also the most important thing to get right when doing Continuous Delivery or DevOps. Recently Aslak Knutsen and I hosted a webinar with the title “Continuous Development with Automated Testing”. The webinar had quite a few viewers (and maybe that was one of the reasons that the demo in the webinar didn’t exactly go as planned.)

Aslak did a great job trying to talk through a demo that played at 1/3 of normal speed, but eventually we had to stop; it was too difficult to convey the information, and we wouldn’t have been able to finish the talk within the time constraints.

The recording of the webinar is available here, but please take a look at the slides from the webinar with newly recorded demos on slide 29 and 30.

To run the demo your self, please follow the instructions below:

  1. Get the source
    git clone https://github.com/aslakknutsen/jboss-eap-quickstarts.git
    cd jboss-eap-quickstarts
    git checkout eap_7_webinar
  2. Run the testFirst start EAP 7.0.0 Server with default settings
    mvn clean install -f kitchensink/pom.xml -P arq-eap-remote
  3. Run the tests with recorder
    mvn clean install -f kitchensink/pom.xml -P arq-eap-remote,record

    See kitchensink/target/recorder


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

What’s new with JPA 2.1 and Hibernate 5 in JBoss EAP 7

Background

hibernate-bookThe Java Persistence API (JPA) provides Java developers with an object/relational mapping facility for managing relational data in Java applications. The latest version of the JPA standard is 2.1 and is part of Java EE 7.

JBoss Enterprise Application Platform is a fully certified Java EE application server and JBoss EAP 7 which is currently in Beta is certified according to the most recent Java EE 7 specification.

Hibernate is one of the most popular JPA implementations and is known for it’s High Performance, Scalability and Reliability.

For more details about JPA and Hibernate I recommend reading Java Persistence with Hibernate, Second Edition.

Continue reading “What’s new with JPA 2.1 and Hibernate 5 in JBoss EAP 7”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Run your first Java EE application with JBoss EAP 7 Beta

This article describes how efficient development is on JBoss EAP 7. It will also give example of different build tools  and Integrated Development Environments (IDEs) to use for application development on JBoss EAP 7. Additionally it will briefly explain how dependency management[1] works for Java EE 7 and JBoss EAP specific artifacts.

Finally there is a step-by-step guide that demonstrates how fast and efficient it is to develop on JBoss EAP 7.

Continue reading “Run your first Java EE application with JBoss EAP 7 Beta”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Screen cast – Getting started with JBoss EAP 7 Beta

This screen cast shows in details how to download and install JBoss EAP 7 Beta.

The commands that are run in the video are as follows:

java -version
$JBOSS_HOME/bin/add-user.sh
$JBOSS_HOME/bin/standalone.sh
mvn clean install
mvn wildfly:deploy



Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

JBoss EAP 7 Beta is now available!

JBoss EAP 7 Beta is now available! Here’s a preview of what’s to come…

Today, we officially announced the availability of Red Hat JBoss Enterprise Application Platform 7 beta. We truly believe this release will shift the way the enterprise Java community thinks about application servers and builds Java applications.

But, before we get into the details of how you can use JBoss EAP 7 to accomplish this, I want to bring attention and recognition to the community who made this monumental release possible.

JBoss EAP 7 Beta was the result of years of hard work and dedication by a broad team of people throughout the JBoss EAP / WildFly community. With ingenuity, persistence, and passion, this team built and delivered a product that developers will love from the first time they download the bits until they push their application to production. Building software that fits the promise of JBoss Middleware – lightweight, high performance, enterprise quality, and enables high productivity – is a huge challenge. And this team has done an amazing job in meeting and exceeding these goals with this release. Thank you to all of you who worked so hard to make this beta release possible!

Continue reading “JBoss EAP 7 Beta is now available!”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!