World Map
Java Service Wrapper is the easiest way to make your product more reliable.
  • Free Trial
  • Buy Now
wrapper.ntservice.preshutdown.* Properties

wrapper.ntservice.preshutdown.* Properties

Compatibility :3.5.30
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSX (Not Supported)Linux (Not Supported)IBM AIX (Not Supported)FreeBSD (Not Supported)HP-UX (Not Supported)Solaris (Not Supported)IBM z/OS (Not Supported)IBM z/Linux (Not Supported)

When the system shuts down, it will wait a short time (generally between 5 to 20 seconds) for the services to terminate cleanly. Beyond this limit, all services that keep running will be killed. In most cases, the services have enough time to stop normally, but some might need more time to perform cleanup tasks.

Before shutting down, the system will send a 'preshutdown' notification. A service that needs additional time can handle this notification by setting wrapper.ntservice.preshutdown to TRUE. This will cause the system shutdown to be blocked until the service stops or the preshutdown timeout expires.

The default value is "FALSE".

WARNING

Blocking the system shutdown may affect the user experience. This property should be set to TRUE only if the cleanup tasks of the stopping process are absolutely necessary.

NOTE

This property is only used on Windows platforms. It is ignored on Windows Itanium, Windows XP and lower. For these versions of Windows, a possible workaround is to edit the "WaitToKillServiceTimeout" registry key, but this is not really recommended as it would apply to all the services of the system.

wrapper.ntservice.preshutdown

Compatibility :3.5.30
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSX (Not Supported)Linux (Not Supported)IBM AIX (Not Supported)FreeBSD (Not Supported)HP-UX (Not Supported)Solaris (Not Supported)IBM z/OS (Not Supported)IBM z/Linux (Not Supported)

If set to TRUE, the service will handle the 'preshutdown' notification sent by the system. This will block the system shutdown until the service stops or the timeout interval specified by wrapper.ntservice.preshutdown.timeout expires.

Example:
wrapper.ntservice.preshutdown=TRUE

wrapper.ntservice.preshutdown.timeout

Compatibility :3.5.30
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSX (Not Supported)Linux (Not Supported)IBM AIX (Not Supported)FreeBSD (Not Supported)HP-UX (Not Supported)Solaris (Not Supported)IBM z/OS (Not Supported)IBM z/Linux (Not Supported)

This property specifies the amount of time that the Windows Service Manager will wait after sending the preshutdown notification. When the timeout expires, the system will start its shutdown process and will wait for an additional shutdown timeout (not configurable from the Wrapper) before it would kill the remaining running services.

Valid values are in the range of "1" to "3600" seconds. The default value is 180 seconds (3 minutes).

Example (the system will wait up to 5 min for the service to stop):
wrapper.ntservice.preshutdown.timeout=300

WARNING

This timeout is not directly used by the Wrapper but is given to the Windows Service Manager. To ensure that the Service Manager will not interrupt a process before the Wrapper, it is advised to choose a value that is longer than the sum of the Wrapper timeouts that apply on shutdown. These timeouts are the wrapper.shutdown.timeout, the wrapper.jvm_exit.timeout, the wrapper.jvm_cleanup.timeout (when managing child processes) and the wrapper.request_thread_dump_on_failed_jvm_exit.delay (when using Thread Dump if the JVM does not exit on request).

For the cases where the system shutdown timeout is critical, the Wrapper will not impose wrapper.ntservice.preshutdown.timeout to be longer than the timeouts previously listed, however the default value of 3 min is set much longer than the sum of their default values.