Enable Eclipse MicroProfile applications on Red Hat JBoss Enterprise Application Platform 7.3

Enable Eclipse MicroProfile applications on Red Hat JBoss Enterprise Application Platform 7.3

In this article, we show you how to install Red Hat JBoss Enterprise Application Platform (JBoss EAP) XP 1.0.0.GA and enable Eclipse MicroProfile support on JBoss EAP. Once you have MicroProfile support enabled, you can start using the quickstart examples or start developing your own application.

You can find a demo video at the end of this article.

Installing JBoss EAP XP 1.0.0.GA

To install JBoss EAP XP 1.0.0.GA:

  1. Download the following software from the product download page:

    • JBoss EAP XP manager
    • JBoss EAP 7.3.1 GA patch
    • JBoss EAP XP 1.0
  2. Apply the JBoss EAP 7.3.1 GA patch:

    $ patch apply /DOWNLOAD/PATH/jboss-eap-7.3.1-patch.zip
  3. Set up JBoss EAP XP manager using the following CLI command:

    $ java -jar jboss-eap-xp-1.0.0.GA-CR1-manager.jar setup --jboss-home=/INSTALL_PATH/jboss-eap-7.3
  4. Apply the JBoss EAP XP 1.0 patch using the following management command:

    $ patch apply /DOWNLOAD/PATH/jboss-eap-xp-1.0.0.GA-patch.zip

Configure CodeReady Studio

To enable Eclipse MicroProfile support on JBoss EAP, we first need to register a new runtime server for JBoss EAP XP 1.0.0 (which we just installed). For this, we will create a new JBoss EAP 7.3.0 server called Red Hat JBoss EAP 7.3 XP 1.0.

This server will use a newly created JBoss EAP 7.3 XP 1.0 Runtime that points to the newly installed runtime and uses the standalone-microprofile.xml configuration file. Set up the New Server dialog box as shown in Figure 1:

  1. Select server type Red Hat JBoss Enterprise Application Platform 7.3.
  2. Set Server’s host name to localhost.
  3. In Server name, enter Red Hat JBoss EAP 7.3 XP 1.0.
  4. Click Next.
New Server dialog box with the specified options selected

Figure 1: Define your new server.

In the next dialog box, configure your new server as shown in Figure 2:

  1. Set the Home Directory if you don’t want to use the default setting.
  2. Make sure your Execution Environment is set to JavaSE-1.8.
  3. Change the settings for Server base directory and Configuration file if you don’t want the defaults.
  4. Click Finish.
New Server dialog box for configuring the JBoss Runtime

Figure 2: Configure your new server.

In order to use the microprofile-opentracing quickstart (Figure 5) we need to set environment variables on our runtime. To do so, in the Red Hat JBoss EAP 7.3 XP 1.0 server Overview dialog box shown in Figure 3, click Open launch configuration.

dialog box showing an overview of the server's settings

Figure 3: Set environment variables from the server Overview dialog box.

In particular, you need to create three environment variables as shown in Figure 4:

  • JAEGER_SAMPLER_TYPE set to const
dialog box showing the newly created environment variables

Figure 4: Configure your runtime’s environment variables.

Use the quickstarts

Select the Quickstart Parent pom.xml to import it as shown in Figure 5, and you are ready to go.

Project Explorer with quickstart-parent selected.

Figure 5: Import quickstart-parent to turn on kickstarts.

With the kickstarts turned on, you have simple examples that you can run and test on your installed server covering:

  • Eclipse MicroProfile Config
  • Eclipse MicroProfile Fault-tolerance
  • Eclipse MicroProfile Health
  • Eclipse MicroProfile JWT
  • Eclipse MicroProfile Metrics
  • Eclipse MicroProfile OpenAPI
  • Eclipse MicroProfile OpenTracing
  • Eclipse MicroProfile REST Client

For more information about Eclipse MicroProfile take a look at the specifications, check out MicroProfile Starter. If you prefer to watch a demo, check it out here: