${build.shortName} can be suspended or shut down gracefully. This allows active requests to complete normally, without accepting any new requests. A timeout value specifies how long that the suspend or shut down operation will wait for active requests to complete. While the server is suspended, management requests are still processed.
Graceful shutdown is coordinated at a server-wide level, mostly focused on the entry points at which a request enters the server. The following subsystems support graceful shutdown:
undertow
subsystem will wait for all requests to finish.modcluster
subsystem will notify the load balancer that the server is suspending in the
PRE_SUSPEND
phase.
ejb3
subsystem will wait for all remote EJB requests and MDB message deliveries to finish. Delivery to MDBs is stopped in the
PRE_SUSPEND
phase. EJB timers are suspended, and missed timers will be activated when the server is resumed.
java.lang.IllegalStateException
. Once the server is resumed, scheduled tasks will continue to execute normally and in most cases, tasks will not need to be rescheduled.
Requests are tracked by the request-controller subsystem. Without this subsystem, suspend and resume capabilities are limited and the server will not wait for requests to complete before suspending or shutting down. However, if you do not need this capability, the request-controller subsystem can be removed for a small performance improvement.