How to deploy temporarily an application on JBoss ?

The current version of WildFly / JBoss EAP does not provide a way to deploy temporarily your application, so that it is automatically removed when you shut down the server.

As an alternative, you can use add a file named <application>.skipdeploy in the deployments folder. This marker file disables auto-deploy of an application while present. It is useful as a method of temporarily blocking the auto-deployment of exploded content, preventing the risk of incomplete content edits pushing live. Can be used with zipped content, although the scanner detects in-progress changes to zipped content and waits until completion.

If you are running JBoss 5, one way to do it, is using the jboss.system:service=MainDeployer Mbean.
In practice, if you deploy an application using this MBean your application will be temporarily deployed on the application server. Why temporarily ? because it’s not copied into the “deploy” directory but simply deployed where it is.

The location of the application is not persisted, JBoss keeps in memory the location of the application, so at server shutdown the application will exit from JBoss.

One way to reach this MBean is via the twiddle utility:

twiddle invoke "jboss.system:service=MainDeployer" deploy C:\TempApp.war

Here the web application TempApp.war is deployed from C:\ . Until JBoss is running.


Recommended Articles

Enable or Disable Hot Deployment in WildFly Application Server - A Comprehensive Guide

Learn how to control hot deployment in WildFly with CLI commands and configuration files for optimal performance.

Configure JBoss EAP/WildFly Deployment Order with Ease

Learn how to configure precise deployment order in EAR files and between multiple deployments using JBoss EAP/WildFly.

Configure Jenkins for Remote WildFly and JBoss EAP Deployment with Maven Plugin

Learn how to use the Maven plugin to deploy your application remotely to a WildFly or JBoss EAP server using Jenkins.

[Solved] Fix "Failed to start service jboss.deployment.unit" in WildFly

Learn how to solve the 'Failed to start service jboss.deployment.unit' error in WildFly & JBoss EAP. Decode deployment phases (.PARSE, .DEPENDENCIES, .INSTALL) and fix root causes.