Stop framework from a JVM shutdown hook

  • Example: -runshutdownhook: true; timeout=30000

  • Values: true,false

  • Pattern: true|false|TRUE|FALSE

Directives

  • timeout Maximum time in milliseconds to wait for the framework to stop.
    • Example: timeout=30000

    • Pattern: \d+



-runshutdownhook

The -runshutdownhook instruction makes the launcher stop the framework when the JVM is shutting down (for example Ctrl-C or SIGTERM).

-runshutdownhook: true; timeout=30000

By default this instruction is false.

Attributes

  • timeout – Maximum time in milliseconds to wait for the framework to stop. Default is 10000.

When enabled, this is passed to the launcher as:

  • launch.shutdown.hook
  • launch.shutdown.hook.timeout

So exported executable jars can also be configured at startup, for example:

java -Dlaunch.shutdown.hook=true -Dlaunch.shutdown.hook.timeout=30000 -jar app.jar