LIGHTSTREAMER SERVER LAUNCH
===========================

---------------
STANDARD LAUNCH
---------------

To launch Lightstreamer Server, find the script suitable for your system in the
provided directories.
The scripts cover both the case of direct launch and the case of installation
in the system for managed launch.

The scripts are meant to be manually modified to configure some properties.
Note that, upon Server upgrades, the same modifications will have to be applied
to the new factory scripts.

Moreover, it is possible to modify the scripts to customize them to the actual
system or environment characteristics. Again, it is possible that, upon Server
upgrade, the modified scripts will have to be aligned to reflect changes
occurred in the factory scripts. When this is the case, it will be clearly
stated in the Server changelog.

-------------
MANUAL LAUNCH
-------------

Although relying on the provided scripts is recommended in order to provide
all the needed properties, direct launch of the JVM is possible, for instance
to run Lightstreamer Server from within a development tool in order to debug
in-process Adapters.

The full requirements for the launch of the JVM to run the Server are not
straightforward, because the Server doesn't load all the needed jars from the
classpath. This allows for separation in different ClassLoaders of third-party
libraries required by the Server and custom third-party libraries that can be
added. Such custom third-party libraries may include:
- Java In-Process Metadata and Data Adapters;
- Third-party libraries used by the Java In-Process Adapters;
- Extensions providing custom appenders to the log configuration.

For this reason, the Server's third-party libraries to be loaded are specified
through JVM properties, to be supplied as JVM command line arguments.
Hence, the full requirements for the launch of the JVM to run the Server are
the following:

- launch directory
    Free choice, but it is suggested to use either this folder or the parent
    "Lightstreamer" folder.

- classpath
    It should only include ls-bootstrap.jar from the "lib" folder and
    ls-adapter-inprocess-x.y.z from the "lib/adapters" folder.

- VM arguments
    The following 4 JVM properties should be specified through the
        -Dprop=value
    syntax, where the value is a classpath, to be expressed in the platform
    classpath syntax:
    - com.lightstreamer.kernel_lib_path
        the value includes lightstreamer.jar from the "lib" folder;
    - com.lightstreamer.internal_lib_path
        the value includes ls-monitor.jar from the "lib" folder and all the
        libraries in the "lib/core" and "lib/log/bridge" folders;
    - com.lightstreamer.logging_lib_path
        the value includes ls-logging-utilities.jar from the "lib" folder
        and all the libraries in the "lib/log" folder (but not including the
        "lib/log/bridge" subfolder); any custom extension needed for the
        configuration of the log should also be included here;
    - com.lightstreamer.mpn_lib_path
        the value includes ls-mpn.jar from the "lib" folder and all the
        libraries in the "lib/mpn" folder and all its subfolders.

- main class
    com.lightstreamer.LS

- Program arguments
    the path to the main configuration file (i.e. lightstreamer_conf.xml).

where all paths can be either absolute or relative to the launch directory.

Windows example:
    java ^
        -cp lib\ls-bootstrap.jar;lib\adapters\ls-adapter-inprocess-8.0.0.jar ^
        -Dcom.lightstreamer.kernel_lib_path=lib\lightstreamer.jar ^
        -Dcom.lightstreamer.internal_lib_path=lib\ls-monitor.jar;lib\core\*;lib\log\bridge\* ^
        -Dcom.lightstreamer.logging_lib_path=lib\ls-logging-utilities.jar;lib\log\* ^
        -Dcom.lightstreamer.mpn_lib_path=lib\ls-mpn.jar;lib\mpn\*;lib\mpn\hibernate\*;lib\mpn\apple\*;lib\mpn\google\* ^
        com.lightstreamer.LS ^
        conf\lightstreamer_conf.xml

Linux example:
    java \
        -cp lib/ls-bootstrap.jar:lib/adapters/ls-adapter-inprocess-8.0.0.jar \
        -Dcom.lightstreamer.kernel_lib_path=lib/lightstreamer.jar \
        -Dcom.lightstreamer.internal_lib_path=lib/ls-monitor.jar:lib/core/*:lib/log/bridge/* \
        -Dcom.lightstreamer.logging_lib_path=lib/ls-logging-utilities.jar:lib/log/* \
        -Dcom.lightstreamer.mpn_lib_path=lib/ls-mpn.jar:lib/mpn/*:lib/mpn/hibernate/*:lib/mpn/apple/*:lib/mpn/google/* \
        com.lightstreamer.LS \
        conf/lightstreamer_conf.xml

------------
SHORT LAUNCH
------------

Only for development purpose, it is possible to do without the ClassLoader
separation offered by LS Server and provide all the needed libraries in the
main classpath. Obviously, this will work only if no conflicts are expected
between the third-party libraries required by the Server and any custom
third-party library related to the installed Adapters (including the Adapter
code itself).

In this case, the requirements for the launch of the JVM to run the Server
become the following:

- launch directory
    Free choice, but it is suggested to use either this folder or the parent
    "Lightstreamer" folder.

- classpath
    It should include all the libraries from the "lib" folder and all its
    subfolders with the exception of the "lib/log/bridge" subfolder;
    any custom extension needed for the configuration of the log should also
    be included here.

- main class
    com.lightstreamer.LS

- Program arguments
    the path to the main configuration file (i.e. lightstreamer_conf.xml).
