Summary: Loads a space container, one space, an embedded Reggie, and an embedded Webster, using the gsInstance script.

Overview

This section explains how to start a light version of the GigaSpaces server, which loads a container and one space, using the gsInstance script. The gsInstance (which calls SpaceFinder ) starts by default embedded Reggie and Webster services.

Starting Embedded Mahalo

By default, gsInstance does not start an embedded Mahalo (Jini Transaction Manager).

You can enable this option in one of the following ways:

  • Setting the following option to true in your container schema:
    <embedded-services>
    ...
    <mahalo>
    	<!-- If true, will start an embedded Mahalo Jini Transaction Manager. Default value: false -->
        <start-embedded-mahalo>${com.gs.start-embedded-mahalo}</start-embedded-mahalo>
    </mahalo>
  • Setting the following option in the gsInstance command line:
    -Dcom.gs.start-embedded-mahalo=true
  • Setting XPath in the <GigaSpaces Root>\config\gs.properties file:
    com.j_spaces.core.container.embedded-services.mahalo.start-embedded-mahalo=true
GigaSpaces supports space monitoring and management using JMX - The Java Management Extensions. For more details, refer to the JMX Management section.
When running gsIntance, the Jini Lookup Service runs implicitly. When having many Jini Lookup Services running across the network, the spaces and clients might be overloaded since they publish themselves into the Lookup Service, or are trying to get updates about newly registered services.
A good practice is to have two Lookup Services running using the startJiniLUS command located in the <GigaSpaces Root>\bin directory, or the GSM command located in the <GigaSpaces Root>\bin folder. This ensures no single point of failure for the Lookup Service.

Syntax & Arguments

The full gsInstance syntax (the arguments passed below are optional):

gsInstance "/./newSpace?schema=persistent" "../../classes" "-DmyOwnSysProp=value -DmyOwnSysProp2=value"

The gsInstance arguments are passed through the command line. These arguments are optional - if you do not want to pass any arguments, you don't have to specify anything in the command line, as seen below:

gsInstance

You can use three arguments. All arguments must be enclosed by quotes (" "). If used, the arguments must be entered in the following order (descending):

Argument Description
Argument 1 Defines a space URL. The value is set into the SPACE_URL variable. If no value is passed for this argument, the space URL defined in the gsInstance script is used.
Argument 2 Defines a path which will be appended to the beginning of the used classpath. The value you define is set into the APPEND_TO_CLASSPATH_ARG variable. If no value is passed, the classpath defined in the gsInstance script is used.
Argument 3 Defines additional command line arguments such as system properties. The value is set into the APPEND_ADDITIONAL_ARG variable.

If you are using the third and/or second argument only, you must use empty quote signs for the argument or arguments that come before the one you are using. For example:

gsInstance "" "" "-DmyOwnSysProp=value -DmyOwnSysProp2=value"

In the example above, only the third argument is used, so two pairs of empty quote signs are written before it. In this case, the default URL and classpath (defined in the gsInstance script) are used, and only the system properties are appended.

The Java command in the gsInstance script starts the JVM that hosts the space. For more details, refer to the Quick Start Guide - Using the Examples (GigaSpaces Environment) - The Server Side.

GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence