Coding EJB clients for JBoss EAP 7.1

This article summarizes some new features that will be enabled in EAP 7.1 for applications using remote EJB clients. These new features will improve some aspects of the remote EJB communication such as:

  • A simplified method for looking up remote EJBs
  • A new annotation to control transaction propagation from remote EJB clients
  • A new annotation to enable Client side interceptors for EJB calls
  • An update in the remote EJB client configuration file
  • Simplified lookup of remote EJBs

Continue reading “Coding EJB clients for JBoss EAP 7.1”

Share

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.”

Share

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”

Share

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”

Share

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)”

Share

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.)

Continue reading Continuous Development with Automated Testing

Share