When the user presses CTRL-C in a Windows console or UNIX shell,
or sends a TERM signal to the Wrapper process on UNIX,
the Wrapper will begin its shutdown process.
This means that the Wrapper will honor all of its configured timeouts,
waiting for the JVM to shutdown
and exit cleanly before shutting down itself.
If the JVM is behaving poorly, or there was a misconfiguration,
this means that the Wrapper could potentially take quite a while to actually shutdown.
Early in the life of the Wrapper this usability problem was identified and we added logic
so that a second CTRL-C or TERM signal would tell
the Wrapper to ignore all the timeouts, kill the JVM process immediately, and shutdown now.
This forced shutdown will also happen if the Wrapper had already begin its shutdown process for any other reason.
While this behavior is usually very convenient, there are also times
where the administrator wants to make sure that the JVM will never be forcibly shutdown in this way.
This property makes it possible to disable this feature.
Valid property values include:
to disable the forced shutdown. Any secondary requests to shutdown will be ignored.
to enable the forced shutdown. A shutdown request received when the Wrapper is already
shutting down will cause the JVM to be immediately killed.
The default value is FALSE.
Log Example: (Forced shutdown enabled)
wrapper | CTRL-C trapped. Shutting down.
wrapper | CTRL-C trapped. Forcing immediate shutdown.
wrapper | JVM did not exit on request, terminated
wrapper | <-- Wrapper Stopped
If forced shutdowns have been disabled and the
or wrapper.jvm_exit.timeout properties are set to long values,
you may need to wait for both timeouts to complete before the Wrapper will shutdown.
In this case, the only way to speed up the shutdown is to forcibly kill the Java process
using the Task Manager on Windows, or a kill -9 on UNIX.
Note that on some versions of Windows, it is not possible to kill Java from the Task Manager when running as a service.
The Java Service Wrapper provides a full set of configuration properties that allows you to make the Wrapper meet your exact needs.
Please take a look at the documentation for the individual properties to see all of the possibilities beyond the examples shown above.