Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Develop Eclipse MicroProfile applications on Red Hat JBoss Enterprise Application Platform Expansion Pack 1.0 with Red Hat CodeReady Workspaces

July 1, 2020
Emmanuel Hugonnet
Related topics:
JavaDeveloper ToolsDevOpsMicroservices

Share:

    This article builds on my previous tutorial, Enable Eclipse MicroProfile applications on Red Hat JBoss Enterprise Application Platform 7.3. To follow the examples, you must have Eclipse MicroProfile enabled in your Red Hat JBoss Enterprise Application Platform Expansion Pack (JBoss EAP XP) 1.0.0.GA installation, via Red Hat CodeReady Studio. See the previous article for installation instructions.

    In this article, we will use the installed MicroProfile-enabled image to set up a JBoss EAP XP quickstart project in Red Hat CodeReady Workspaces (CRW). You can also apply what you learn from this article to develop your own applications using CodeReady Workspaces.

    Note: For more examples, be sure to see the video demonstration at the end of the article.

    Step 1: Create a new devfile

    To start, open CodeReady WorkSpaces and create a new devfile. In the next sections, I'll describe the steps to configure and build this devfile so that you can build and run the quickstarts in CodeReady Workspaces. You can download the sample devfile here.

    Step 2: Define the editor plugins

    Because this is a Java project, we're using the Java Che plugin:

    components: 
    -
      type: chePlugin
      id: redhat/java11/latest
    -
    

    Step 3: Define the Jaeger Docker image

    This example uses Jaeger for MicroProfile OpenTracing, so we include a Docker image to start a Jaeger server instance and expose its UI endpoint on port 16686:

    components: 
    - 
      alias: jaeger
      type: dockerimage
      image: jaegertracing/all-in-one
      memoryLimit: 128Mi
      endpoints:
          - name: 'tracing-ui'
            port: 16686
    -
    

    Note: You can find the full eapxp-quickstarts.yaml file here.

    Step 4: Define the JBoss EAP XP component

    The last component is the source-to-image (S2I) Docker image for JBoss EAP XP. This image provides instances of both Apache Maven to build the applications and the JBoss EAP XP runtime to run them.

    We need to expose the HTTP endpoint to be able to access the running application on port 8080. Later, we'll also need to be able to expose the management endpoint on port 9990, because JBoss EAP XP exposes the MicroProfile Health and MicroProfile Metrics APIs on this endpoint.

    We also define the environment variables for this container. These will configure its various elements, as shown:

    -
      type: dockerimage
      alias: maven
      image: 'registry.redhat.io/jboss-eap-7/eap-xp1-openjdk11-openshift-rhel8@sha256:bebc469f8b21d8132f7b0df62b90107e68e7a77c36d39270f349216557102787'
      env:
    # Enabling Jaeger tracing
       - name: WILDFLY_TRACING_ENABLED
         value: 'true'
    # Define the Jaeger service name 
       - name: JAEGER_SERVICE_NAME
         value: 'microprofile-opentracing'
    # Configure Jaeger traces
       - name: JAEGER_REPORTER_LOG_SPANS 
         value: 'true'
       - name: JAEGER_SAMPLER_TYPE
         value: 'const'
       - name: JAEGER_SAMPLER_PARAM
         value: '1'
       -
        name: MAVEN_OPTS
        value: >-
         -Xmx200m -XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4
         -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom -Duser.home=/home/jboss
      memoryLimit: 1024Mi
      endpoints:
       -
        name: eap-http
        port: 8080
       -
        name: eap-management
        port: 9990
      mountSources: true
      volumes:
       -
        name: m2
        containerPath: /home/jboss/.m2
    

    First, we set the environment variable WILDFLY_TRACING_ENABLED to true to enable MicroProfile OpenTracing in JBoss EAP XP.

    Second, we configure how Microprofile OpenTracing traces are collected and sent to the Jaeger instance using JAEGER_SERVICE_NAME, JAEGER_REPORTER_LOG_SPANS, JAEGER_SAMPLER_TYPE, and JAEGER_SAMPLER_PARAM.

    Last, we need to configure Apache Maven using MAVEN_OPTS.

    As shown in Figure 1, we provide several commands. The most notable is a build command to build from the Apache Maven pom.xml. (We'll use the copy war command to deploy the application after it's been built.)

    A screenshot of the build commands available in the quickstart project workspace.
    Figure 1: Build commands for the MicroProfile OpenTracing quickstart project.

    Step 5: Build the project

    Finally, we select the pom.xml for the microprofile-opentracing quickstart and build the file. Once it is built, you can copy the resulting WAR file. Use the eap-http endpoint command to produce endpoint traces, then use the tracing-ui command to see them in the Jaeger instance, as shown in Figure 2.

    A screenshot of the build file for the MicroProfile OpenTracing quickstart project.
    Figure 2: Build the MicroProfile OpenTracing quickstart project.

    Next steps

    You can follow these instructions and the video demonstration at the end of the article to build and install the microprofile-health and microprofile-metrics quickstart projects in your workspace. You would use the eap-management endpoint to access MicroProfile Health content, as shown in Figure 3.

    A screenshot of the CRW workspace with the MicroProfile Health endpoint configured.
    Figure 3: Database connection for a MicroProfile application health check.

    Video demo: See more MicroProfile quickstarts in action

    This video demonstrates how to set up CodeReady Workspaces to build and run MicroProfile quickstarts on JBoss EAP XP 1.0. Start the video now to see Eclipse MicroProfile OpenTracing, Eclipse MicroProfile Health, and Eclipse MicroProfile Metrics in action.

    Conclusion

    In my previous article, I showed you how to install JBoss EAP XP 1.0 and enable Eclipse MicroProfile support on that platform. In this article, I showed you how to configure and run a MicroProfile quickstart project using CodeReady Workspaces. For more details, be sure to check out the video demonstration that is included in both articles.

    Recent Posts

    • Supercharging AI isolation: microVMs with RamaLama & libkrun

    • Simplify multi-VPC connectivity with amazon.aws 9.0.0

    • How HaProxy router settings affect middleware applications

    • Fly Eagle(3) fly: Faster inference with vLLM & speculative decoding

    • Kafka Monthly Digest: June 2025

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue