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

Compatibility :3.3.0
Editions :Professional EditionStandard Edition (Not Supported)Community Edition (Not Supported)
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

This property is used to specify the arguments of a command executed in response to a specific event.

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

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

The "<event_name>" component of the property name can be either the keyword "default", or one of the Event Types. The "<n>" component of the property name is an integer number counting up from "1". The wrapper.ignore_sequence_gaps property can optionally be set to allow gaps in the sequence.

NOTE

Use of the "default" keyword was added in Wrapper version 3.5.5.

event.default.command:

It is not possible specify default values for individual elements of a command. The Wrapper will first look for a wrapper.event.<event_name>.command.argv.1. If found, it will then only look for the command elements containing the <event_name>. If it was not found, then Wrapper will look for the wrapper.event.default.command.argv.1 property. Finding that, it will then look for the remainder of the command using the default event properties.

Note that defining a "default event command" will cause the command to be executed for every single Wrapper event, including user-defined events.

Example:
wrapper.event.jvm_prelaunch.command.argv.1=/usr/bin/mycleanup
wrapper.event.jvm_prelaunch.command.argv.2=/tmp/myapp-tmp

Please see the Event Commands documentation for more examples and an explanation of how the various event properties can be used together.

Event Handler Variables:

When the Wrapper is generating the command line to execute the child process, the Event Handler Variables will be replaced in the value.

Example:
wrapper.event.jvm_prelaunch.command.argv.1=/usr/bin/mycleanup
wrapper.event.jvm_prelaunch.command.argv.2=/tmp/myapp-tmp-%WRAPPER_EVENT_JVM_PID%

Quotes:

For each entry, you can also have a corresponding strip quotes flag (stripquotes property = TRUE) that will remove unescaped quotes from the element when run on Linux/UNIX machines. This is necessary to allow for file references that contain spaces. For parameters like the example below, it would not otherwise be possible to decide when to remove quotes and when to leave them alone. All other characters except for the following will remain unchanged.

  • '\\' will become '\'
  • '\"' will become '"'
  • '"' will become '' (nothing)
Example:
wrapper.event.jvm_prelaunch.command.argv.1=/usr/bin/mycleanup
wrapper.event.jvm_prelaunch.command.argv.2="Argument with spaces."
wrapper.event.jvm_prelaunch.command.argv.2.stripquotes=TRUE

Problems?

Whenever any problems are found while trying to configure an event command, it can be very useful to enable debugging to help figure out exactly what is happening.

Example:
wrapper.event.default.command.loglevel=INFO

Reference: Event Commands

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.