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.