wrapper.event.<event_name>.command.on_exit.<n>

Compatibilidad :3.3.0
Ediciones :Edición ProfesionaEdición Estándar (No Compatible)Edición de la Comunidad (No Compatible)
Plataformas :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/Linux

This property controls what the Wrapper will do in response to specific exit codes of event commands. It makes it possible to react in different ways depending on whether or not the command had any problems.

Like several of the event command properties, it can be defined:

  • Globally for all events: wrapper.event.default.command.on_exit.<n> property, or
  • For a specific event: wrapper.event.<event_name>.command.on_exit.<n> property.

The "<event_name>" component of the property name can be either the keyword "default", or one of the Event Types. By setting the default property, all Event Types which are not set explicitly will take on that value. The "<n>" component of the property name is an exit code.

The action can be one of the following:

  • SHUTDOWN - will proceed to shutdown the Wrapper.
  • CONTINUE or IGNORE - will tell the Wrapper to continue with normal operation.

The default value is CONTINUE.

Example:
wrapper.event.jvm_prelaunch.command.block=TRUE
wrapper.event.jvm_prelaunch.command.on_exit.0=CONTINUE

NOTA

If the Wrapper is not configured to block for the completion of the command, then this property will be ignored and the Wrapper will always continue.

Example:

The following example will execute a cleanup script immediately before launching any JVM instance. It will wait for up to 30 seconds for the script to complete. Then if the script exits with an exit code of "0" (zero), the Wrapper will continue. Any other exit code will be treated as an error and the Wrapper will shutdown without launching the JVM.

Example:
wrapper.event.jvm_prelaunch.command.argv.1=/usr/bin/mycleanup
wrapper.event.jvm_prelaunch.command.argv.2=parameter1
wrapper.event.jvm_prelaunch.command.block=TRUE
wrapper.event.jvm_prelaunch.command.block.timeout=30
wrapper.event.jvm_prelaunch.command.on_exit.default=SHUTDOWN
wrapper.event.jvm_prelaunch.command.on_exit.0=CONTINUE

Search Order:

When defining this property, it is possible to define a default action, not only for the exit code, but also for the event type. When searching for an action for a given exit code and given event, the Wrapper will search in the following order:

  • wrapper.event.<event_name>.command.on_exit.<n>,
  • wrapper.event.<event_name>.command.on_exit.default,
  • wrapper.event.default.command.on_exit.<n>, then
  • wrapper.event.default.command.on_exit.default.

Referencia: Comando de Eventos

El Java Service Wrapper proporciona un conjunto completo de propiedades de configuración que le permiten hacer que el Wrapper se adapte exactamente a sus necesidades. Por favor, lea la documentación de las propiedades individuales para ver todas las posibilidades además de los ejemplos mostrados anteriormente.