Deploying an Application with the JBoss EAP Deployment Scanner

15 minutes
  • 3 Learning Objectives

About this Hands-on Lab

JBoss Enterprise Application Platform provides an extensive Java EE-based application server to which we can deploy and manage our applications. Oftentimes, this can be as simple as deploying a provided WAR or EAR file to our configured server. In this lab, we’ll specifically explore how to use the standalone deployment scanner to deploy our applications automatically.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Configure the Deployment Scanner
  1. Move into the JBoss EAP home directory:

    cd /opt/jboss-eap
  1. Access the JBoss Management CLI:

    sudo ./bin/
  2. Connect:

  3. Move to the deployment scanner node:

    cd /subsystem=deployment-scanner/scanner=default
  4. Disable auto-deployment scanner:

  5. Exit the CLI:

Add the Application to the Scanned Directory
  1. Look for the .war file in the cloud_user‘s home directory:

    ls ~
  1. Copy the kitchensink.war file to /opt/jboss-eap/standalone/deployments:

    sudo cp ~/kitchensink.war standalone/deployments/kitchensink.war
  2. Since we disabled auto-deployment, we need to create a marker file to trigger deployment:

    sudo touch standalone/deployments/kitchensink.war.dodeploy
  3. Immediately look in standalone/deployments — notice the kitchensink.war.isdeploying file:

    ls standalone/deployments/
  4. When the file changes to kitchensink.war.deployed, we’ll know our application is ready. We can check this by either looking at our application at PUBLICIP:8080/kitchensink or by looking at our list of deployments in either the console or the CLI.

Disable the Application

To disable the application, remove the kitchensink.war.deployed file. You can always redeploy the application by adding a .dodeploy marker again:

sudo rm standalone/deployments/kitchensink.war.deployed

Additional Resources

You have been tasked with setting up the deployment scanner for your standalone JBoss hosts to streamline the deploy process. That said, you want to retain the ability to disable applications and want to employ some safeguards, so instead of utilizing auto-deployment, a simple deployment marker needs to be created for each deploy.

Using the CLI, disable auto-deployment for XML and zipped files, then test your changes by deploying the kitchensink.war application found in the cloud_user's home directory. You can check that the application is working by navigating to PUBLICIP:8080/kitchensink. Once finished, disable the application.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!