You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2013/03/15 11:27:37 UTC

svn commit: r1456864 - /sling/site/trunk/content/documentation/the-sling-engine/the-sling-launchpad.mdtext

Author: fmeschbe
Date: Fri Mar 15 10:27:37 2013
New Revision: 1456864

URL: http://svn.apache.org/r1456864
Log:
SLING-2791 Add documentation on new shutdown hook registration control

Modified:
    sling/site/trunk/content/documentation/the-sling-engine/the-sling-launchpad.mdtext

Modified: sling/site/trunk/content/documentation/the-sling-engine/the-sling-launchpad.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/the-sling-engine/the-sling-launchpad.mdtext?rev=1456864&r1=1456863&r2=1456864&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/the-sling-engine/the-sling-launchpad.mdtext (original)
+++ sling/site/trunk/content/documentation/the-sling-engine/the-sling-launchpad.mdtext Fri Mar 15 10:27:37 2013
@@ -38,6 +38,7 @@ The Java Standalone Application supports
 | `-p` | port |  The port to listen (default 8080) to handle HTTP requests. This option overwrites the `org.osgi.service.http.port` setting in the `sling.properties` file. |
 | `-r` | path | The root servlet context path for the Http Service (default is /). This option overwrites the `org.apache.felix.http.context_path` setting in the `sling.properties` file and requires the embedded Http Service implementation to honor this property. (since Sling Launchpad 2.4.0) |
 | `-D` | n=v | Sets the property `n` to the value `v`. This option can be added repeatedly setting additional properties. Any property set in this manner overwrites same named properties in the `sling.properties` file. (since Sling Launchpad 2.4.0) |
+| `-n` | -- | Don't install the shutdown hook. See [Shutdown Hook](#shutdown-hook) below. (since Sling Launchpad 2.5.2) |
 | `-h` | -- | Prints a simple usage message listing all available command line options. |
 
 The Sling Standalone application looks for a definition of the `sling.home` setting in the following locations in order of precendence:
@@ -63,6 +64,19 @@ Suggestions:
 * Make sure only legitimate users have access to the installation folder of Sling (`${sling.home}`).
 
 
+### Shutdown Hook
+
+By default the Sling Launchpad standalone application installs a Shutdown Hook with the Java Runtime to make sure the framework is properly
+terminated in case of a Java termination. In some situations or setups you want to control shutdown of Sling yourselves, so Sling supports a command
+line option `-n` to prevent the installation of a shutdown hook.
+
+Apart from the command line option, the `sling.shutdown.hook` system property is also supported: If this property is set to `true` or is not set at all
+the shutdown hook is installed as expected. If the property is set to anything other than `true`, e.g. `false`, the shutdown hook is not installed.
+
+If you are embedding the Sling Launchpad application's `Main` class, the `sling.shutdown.hook` property can also be set as a member of the `props` map
+handed to the `Main` constructor.
+
+
 ## Servlet Parameters
 
 The Web Application does not require specific servlet parameters. Those which are specified are used to overwrite any properties with the same name from the `sling.properties` file. One exception to this rule is the `sling.home` parameter, which is used to set the value of the `sling.home` property. If no parameter with this name is defined the Sling home directory is derived from the context path at which the Sling Web Application is registered.