wrapper.ntservice.dependency.<n>

Compatibility :1.0.0
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)

WARNING

DO NOT modify the value of this property while an application using the configuration file has been installed as a Windows Service. Please uninstall the existing service BEFORE modifying this property. The service with the new value can then be safely reinstalled later.

This property is only used on Windows platforms.

This property is used to set the dependencies of the service managed by the Wrapper. The services or groups listed must be running before this service can be started. Stopping any of the listed services, or all members of a specified group, will also stop this service. Because both services and groups share the same name space, group names must be prefixed with the '+' character.

<n> component:

Each dependency has a property name which starts with wrapper.ntservice.dependency. and the "<n>" component of the property name is an integer number counting up from "1". By default, there can be no missing numbers. The wrapper.ignore_sequence_gaps property can optionally be set to allow gaps in the sequence.

Example:
wrapper.ntservice.dependency.1=MySQL

There is a known problem with dependency ordering when shutting down or restarting the machine. For some reason, the Windows Service Manager completely ignores the dependency tree and tells all services to shutdown simultaneously. Depending on which service gets the signal first, this can result in the services being shutdown in a random order. This is a known problem with all Windows Services and is not specific to the Java Service Wrapper. Unfortunately there does not appear to be any way for the Wrapper to work around this.

NOTE

Changes on this property will not take effect until the Windows Service is reinstalled.

Some users have expressed confusion about the way the declared dependencies affect the startup and shutdown of the Wrapper and its dependent Windows Services. The Wrapper simply registers the dependencies and the Windows Service Manager is responsible for managing the startup and shutdown of both.

Dependency:

See the following examples:

  • Initial State: Both services are stopped.

    Action: Start DependentApp service.

    Result: Only the DependentApp service will be started because it does not depend on the WrapperApp service.

  • Initial State: Both services are stopped.

    Action: Start WrapperApp service.

    Result: Because the WrapperApp service depends on the DependentApp service, the DependentApp service will be started first, then the WrapperApp service will be started.

  • Initial State: DependentApp is running. WrapperApp is stopped.

    Action: Start WrapperApp service.

    Result: The ServiceManager will verify that the DependentApp service is already running then start the WrapperApp service.

  • Initial State: Both services are running.

    Action: Stop DependentApp service.

    Result: The ServiceManager notes that WrapperApp depends on the DependentApp service, so it first stops the WrapperApp service, Then stops the DependentApp service.

  • Initial State: Both services are running.

    Action: Stop WrapperApp service.

    Result: The ServiceManager notes that nothing depends on the WrapperApp service. So only the WrapperApp service is stopped.