1

While an application is being deployed, WildFly returns 404 to any HTTP request. Is it instead possible to instruct WildFly to wait until the deployment is complete, and only then process all the connections?

I.e. current behavior:

  • GET /page/from/my/application => 404 NOT FOUND
  • I myself wait 5 seconds, then press F5 in the browser
  • GET /page/from/my/application => 200 OK

Desired behavior:

  • GET /page/from/my/application => [here WildFly waits until the deployment is finished] 200 OK

I want to use this only on a development machine, so it's not a resource problem to stall connections, since there will not be many of them anyway.

We currently use WildFly 8, but will likely upgrade to 10 relatively soon, so an answer for 10+ would also be interesting.

Not a duplicate: Another question lists this as one of two acceptable alternatives and has an answer that describes how to achieve the other alternative. I'm only interested in whether it is possible to get the behavior described above, which has no answer there.

Community
  • 1
  • 1
  • In jboss-as 5 and below this was the default behaviour, but when AS7 came out, the new decency system meant it started responding as soon as each subsystem was ready, so say undertow starts before the deployment scanner has finished its initial deployment – Will Tatam Mar 02 '17 at 22:10
  • We currently manage this by using iptables to ringfence by dropping traffic until the init.d file returns. You could possibly do similar if you only start from cold rather than using hot deployment – Will Tatam Mar 02 '17 at 22:22
  • Thank you, but I use hot deployment on development machine. –  Mar 04 '17 at 11:16

1 Answers1

1

Graceful startup which is currently to be released in WildFly 11 looks like the solution : Design of graceful startup Discussion on graceful startup

ehsavoie
  • 3,126
  • 1
  • 16
  • 14
  • Is this only for startup, or also for redeployment? –  Mar 04 '17 at 11:13
  • Startup and shutdown of the server, for redeployment I don't know how Undertow manages this. Maybe suspending the server to redeploy then resuming would do the 'trick' for you. – ehsavoie Mar 07 '17 at 08:56