0

With WildFly 15.0.1 I want to use jboss-cli to stop a deployment, but leave it ready for deployment with the next startup of WildFly.

So far I managed to disable or undeploy it keeping its content (same as disable). But when restarting WildFly, the deployment will continue disabled.

deployment enable name
undeploy name --keep-content

I tried also creating a file name.dodeploy in the deployments folder, but this doesn't work as the deployment was done using the Admin Console.

I know that after restart I could call the enable command, but because of some library link problem we would need that the deployment is started on startup and not triggered later.

Is this possible?

Daniel Rodríguez
  • 548
  • 1
  • 10
  • 30
  • 2
    Do you want the application to be deployed only while server startup, not after that ? If so, then you have to use the filesystem bade deployment. In the deployment subsystem you can set scan interval as 0 so that deployment directory will be scanned only at server startup time. – Abhijit Humbe Feb 03 '20 at 15:26
  • It doesn't need to be just on startup, but at least on startup. The problem with the jboss-cli is that I don't find the way to say "deploy it on next startup, but not now". I managed to make this on the deployments folder by placing a file name.dodeploy when WildFly is stopped. That would be our workaround. I just thought that maybe it was possible to do the same using the console. – Daniel Rodríguez Feb 04 '20 at 11:56
  • You'd have to execute another CLI command to enable it. How do you restart your server? Is it a manual or automated process? – James R. Perkins Feb 04 '20 at 17:26
  • The server is restarted with a call to stop the Windows Service. If another CLI command to enable is required after the server is started, I will have to go with the /deployments folder option. – Daniel Rodríguez Feb 05 '20 at 10:04

1 Answers1

0

At the end we didn't find a way to solve this issue using console deployments and jboss-cli. Our final approach is using the /deployments folder:

  1. Deploy artifacts by placing them in the /deployments folder
  2. To stop one single deployment, use JBoss CLI to 'disable' that deployment
  3. Then, Shutdown WildFly
  4. Before starting up WildFly, copy a file deployment-name.dodeploy to the /deployments folder
  5. Start WildFly and the deployment will be performed normally on startup
Daniel Rodríguez
  • 548
  • 1
  • 10
  • 30