gsServer - GigaSpaces CLI

  GigaSpaces 5.X

Documentation Home
Quick Start Guide
Release Notes

Previous release

  Search Here
Searching GigaSpaces Platform 5.X Documentation

                                               

Summary: Launches a space container; a space; an HTTP Daemon; the Jini Lookup Service; the Jini Distributed Transaction Manager Service; and the JavaSpaces Service and RMI Registry.

Overview

The GigaSpaces server is designed to run the core GigaSpaces Container and space(s) as part of the Jini 2 service starter.
When running the GigaSpaces Server the following services are started:

  • GigaSpaces container and its spaces
  • Rio Webster [HTTP Daemon]
  • Jini Transaction Manager Service
  • Jini Lookup Service
  • RMI Registry

The gsServer utility starts the above services together with a default space called myCache running as part of a container called myCache_container using the default schema and properties defined as part of the gs.properties file.

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

gsServer vs. gsInstance

The GigaSpaces Instance starts a light version of the GigaSpaces server, which loads a container and one space, using the gsInstance script. It differs from the GigaSpaces Server – the gsServer uses code defined by Jini, while the gsInstance script uses code defined by GigaSpaces. Moreover, the GigaSpaces Instance starts services which are defined in the GigaSpaces configuration, while the GigaSpaces Server starts services which are defined in the Jini configuration.

For more details on the GigaSpaces Instance, refer to the gsInstance section.

Syntax & Arguments

Syntax

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

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

The following command starts a space called mySpace running as part of a container called mySpace_container:

gsServer "/./mySpace"

The following command starts clustered replicated spaces with synchronous replication:

gsServer "/./mySpace?cluster_schema=sync_replicated&total_members=2&id=1&schema=cache"
gsServer "/./mySpace?cluster_schema=sync_replicated&total_members=2&id=2&schema=cache"

The following command starts clustered partitioned spaces:

gsServer "/./mySpace?cluster_schema=partitioned&total_members=2&id=1&schema=cache"
gsServer "/./mySpace?cluster_schema=partitioned&total_members=2&id=2&schema=cache"

Arguments

The gsServer 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:

gsServer

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 gsServer 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 gsServer 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:

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


Wiki Content Tree


Your Feedback Needed!

We need your help to improve this wiki site. If you have any suggestions or corrections, write to us at techw@gigaspaces.com. Please provide a link to the wiki page you are referring to.

Labels

 
(None)