Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat 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
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud 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

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • 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

Deploy a highly available JBoss EAP application to Azure App Service

October 2, 2023
Philip Hayes
Related topics:
Java
Related products:
Red Hat JBoss Enterprise Application Platform

Share:

    Modern businesses often require scalable, high-performance applications to meet the growing demands of their users. As organizations embrace cloud-based solutions, the need for robust application platforms becomes more critical. To address this need, Red Hat and Microsoft recently announced the general availability of Red Hat JBoss Enterprise Application Platform (JBoss EAP) clustering on Azure App Service.

    • Red Hat announcement
    • Microsoft announcement

    JBoss EAP on Azure App Service can now automatically start as a clustered service using virtual networking for node-to-node communication. It is also enabled for auto-scaling operations through Azure App Service, a fully managed platform for creating web applications.

    In this tutorial, we will go through the steps required to deploy a sample session replication application to a three-node JBoss EAP cluster on Azure App Service:

    1. Create a virtual network.
    2. Create a JBoss EAP app service.
    3. Configure virtual network integration.
    4. Deploy the application.

    Prerequisites

    You will need the following to follow along with this tutorial:

    • A Microsoft Azure account with an active subscription.
    • A GitHub account.

    Set up JBoss EAP clustering on Azure App Service

    Before deploying the Azure app service, we need to clone the sample clustering application repository. Open this GitHub repository and click Fork to clone to your own GitHub account.

    Create a virtual network

    JBoss EAP on Azure App Service uses virtual networks to enable clustering. If you have an existing virtual network configured on your Azure subscription, you can use this. Otherwise, to create a new virtual network, navigate to the Azure Virtual networks page and click + Create. You will be presented with a form, as shown in Figure 1.

    The form fields to create a virtual network.
    Figure 1: Creating a virtual network.

    Choose a resource group (or create a new one), give the virtual network a name, and click Review + create to proceed.

    Create a JBoss EAP app service

    Once the virtual network is created, we can create a JBoss EAP app service and configure it to use the newly created virtual network. Navigate to the Azure App Services page and click + Create to display the Create Web App form (Figure 2).

    The form fields to create a JBoss EAP web app.
    Figure 2: Creating a JBoss EAP web app.

    There are a few things to note when creating the web app:

    • For Runtime stack, select Java 11.
    • For Java web server stack, select Red Hat JBoss EAP 7.
    • Finally, under Zone redundancy, select Enabled to start with a three node cluster.

    Complete the form as shown above and click Review + create, then click Create to create the web app. You will be redirected to the deployment page, shown in Figure 3.

    The deployment page displaying the message "Your deployment is complete."
    Figure 3: Deployment complete.

    Once the deployment is complete, click Go to resource to view the web app details. From this page, you will find the URL of the web app, e.g., eap-cluster.azurewebsites.net.

    Take a quick look at the Scale out page. You should see there are currently three instances of the web app deployed.

    Configure virtual network integration

    Before we deploy our sample application, we need to enable VNet integration. Click Networking. You will notice VNet integration is off.

    Click VNet integration to link a virtual network to the web app. From the VNet Integration page, click + Add VNet to show the Add VNet Integration form (Figure 4).

    The form to add a virtual network to web app via the Add VNet Integration form.
    Figure 4: Adding a virtual network to web app.

    Select the VNet we created previously and select the existing "default" subnet, then click OK to continue. VNet integration should now be enabled for this web app.

    Deploy the sample application

    We are now ready to deploy our sample application. To do this, go to the Deployment Center. Under Settings, select GitHub from the Source dropdown.

    If you have not previously authorized Azure to access your GitHub account, click the Authorize button and follow the instructions. You should then be able to select your organization, repository, and branch, similar to the options shown in Figure 5.

    The Deployment Center page with fields to specify organization, repository, and branch for the deployment.
    Figure 5: Creating a new deployment.

    Click Save to start the deployment. When the deployment is complete, click the URL on the Overview page, adding the /session-replication/ path to access the sample application—e.g., https://eap-cluster.azurewebsites.net/session-replication/. This will display the session replication test page (Figure 6).

    The session replication test page with session information and a blue Increment counter button.
    Figure 6: The session replication app front end.

    If you click the Increment counter button, you should see the session counter increase, the current instance cycling between three IDs, and the session ID remaining unchanged. This confirms clustering is working correctly.

    In addition to testing via the URL, you should also see the cluster being formed from the logs. To do this, click Log Stream and search for Received new cluster view. You should see logs similar to the example below:

    ISPN000094: Received new cluster view for channel ejb: 
    [cafe441b5f83725edc9bf516b4ea569e812ab6508c389d9aafdccfebe722c0ef] (3) 
    [cafe441b5f83725edc9bf516b4ea569e812ab6508c389d9aafdccfebe722c0ef, 
    cc0e013f3fba47255fb962319bc7c35a479c2ffc4871e41576c4db87a4f9e07a, 
    cafe441b5f83725edc9bf516b4ea569e812ab6508c389d9aafdccfebe722c0ef]

    Conclusion

    In this article, we've demonstrated how to set up and test a simple JBoss EAP session replication application with Azure App Service and virtual networks to enable clustering. By setting up a JBoss EAP cluster on Azure App Service, organizations can ensure that their applications are equipped to handle increased traffic, provide uninterrupted service, and deliver a seamless user experience.

    Last updated: February 12, 2024

    Related Posts

    • How to deploy JBoss EAP on an Azure virtual machine

    • How to deploy JBoss EAP applications with OpenShift Pipelines

    • The road to JBoss EAP 8

    • Automate and deploy a JBoss EAP cluster with Ansible

    • Automate Red Hat JBoss Web Server deployments with Ansible

    • How to migrate apps from JBoss EAP 7.x to JBoss EAP 8.0

    Recent Posts

    • Cloud bursting with confidential containers on OpenShift

    • Reach native speed with MacOS llama.cpp container inference

    • A deep dive into Apache Kafka's KRaft protocol

    • Staying ahead of artificial intelligence threats

    • Strengthen privacy and security with encrypted DNS in RHEL

    What’s up next?

    Read Operating OpenShift, a practical guide to running and operating OpenShift clusters more efficiently using a site reliability engineering (SRE) approach. Learn best practices and tools that can help reduce the effort of deploying a Kubernetes platform.

    Get the e-book
    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