This page describes an older version of the product. The latest stable version is 16.4.

Scripts


Note

Some of the features described here are part of the open source edition, while others are only available with the commercial (licensed) editions.

The <XAP root>/bin folder includes the following scripts that can be used to manage and monitor GigaSpaces Runtime components and applications.

Open-Source Scripts

Additional Scripts

The scripts listed below are available in the licensed editions of the GigaSpaces applications.

In addition to the scripts described here, the bin folder contains advanced_scripts.zip for additional tasks, usually for development and troubleshooting.

Service Grid Scripts

If you need to start the Service Grid components manually instead of via the gs-agent, use the following scripts.

Open-Source Scripts

  • lookup-service - starts an instance of the LUS.

Additional Scripts

The scripts listed below are available in the licensed editions of the GigaSpaces applications.

  • gsc - starts an instance of the GSC.
  • gsm - starts an instance of the GSM and LUS.
  • gsm_nolus - starts an instance of the GSM.
  • esm - starts an instance of the ESM.
  • startJiniTX_Mahalo - starts an instance of the Distributed transaction manager.
Note

The Elastic Processing Unit is deprecated as of version 12.1, as noted in the Release Notes.

Processing Units

Open-Source Scripts

  • pu-instance - starts a standalone, un managed instance of a processing unit.
  • space-instance - starts a standalone, un managed instance of a space. Used usually in development.

Additional Scripts

The script listed below is available in the licensed editions of the GigaSpaces applications.

  • gs-memcached - starts standalone, un managed instance of Memcached API listener.

Misc

The scripts listed below are available in the licensed editions of the GigaSpaces applications.

  • lookupbrowser - Used with for special debug scenarios to inspect the lookup service.
  • platform-info - prints GigaSpaces version info (Use the command line version instead).

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

Starting Embedded Mahalo

By default, space-instance 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 space-instance command line:

    -Dcom.gs.start-embedded-mahalo=true

  • Setting XPath in the <XAP Root>\config\gs.properties file:

    com.j_spaces.core.container.embedded-services.mahalo.start-embedded-mahalo=true

Note

XAP supports space monitoring and management using JMX - The Java Management Extensions. For more details, refer to the JMX Management section.

Note

When running space-instance, 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 lookup-service command located in the <XAP Root>\bin directory, or the GSM command located in the <XAP Root>\bin folder. This ensures no single point of failure for the Lookup Service.

Syntax & Arguments

The full space-instance syntax (the arguments passed below are optional):

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

The space-instance 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:

space-instance

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 space-instance 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 space-instance 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:

space-instance "" "" "-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 space-instance script) are used, and only the system properties are appended.