Session Commands

The following are two types of session commands.

  • Monitoring and control commands

    These commands are used for checking or controlling the states of sessions.

    Command Description

    list-session

    Displays the information of sessions sorted by idle time.

    remove-session

    Removes sessions that have been idle during a specified period of time regardless of a session timeout.

    show-session-server-backup-table

    Displays the current backup table information of a session server.

  • Configuration change commands

    These commands add, delete, or change the configuration of the session. Any modified configurations apply to the domain.xml file but not to the currently running service (memory area). Only the domain.xml file is changed. In order to apply the changes to the actual service, the server must be restarted.

    Command Description

    show-session-configuration

    Displays session information.

    modify-session-configuration

    Changes the session configurations.

  • Session server commands

    These commands are used for session storage configuration. To apply the configuration, server must restart.

    Command Description

    list-sessionstorages

    Displays the existing session storage list.

    add-sessionstorage

    Adds a session storage to a session server. For multiple session storages to be added, each name of the session storage must be unique.

    remove-sessionstorage

    Deletes a session storage from a session server.

    rename-sessionstorage

    Changes the name of session storage.

    set-sessionstorage-property

    Adds or changes a session storage property.

    remove-sessionstorage-property

    Deletes a session storage property.

    add-sessionstorage-scope

    Adds a scope to a session storage. For multiple scopes to be added, each scope must be unique. If a scope is set to DOMAIN_WIDE, it can be used in the DOMAIN_WIDE cluster mode.

    set-sessionstorage-scope

    Changes an application or cluster that will be included in a scope.

    remove-sessionstorage-scope

    Deletes a scope from a session storage.

    set-sessionstorage-scope-session-config

    Sets session configuration to be used in the context within a scope.

    list-sessionserver-property

    Displays a list of session server properties.

    set-sessionserver-property

    Adds or changes a session server property.

    remove-sessionserver-property

    Deletes a session server property.

  • Centralized session server commands

    These commands are used to configure session servers in the centralized session clustering. They enable or disable a specific server to operate as a centralized session server. Additionally, commands are provided to configure groups of centralized session servers.

    After configuration, the related server must be restarted for the changes to take effect.

    Command Description

    add-central-session-server

    Sets a specific server to operate as a centralized session server.

    modify-central-session-server

    Modifies the centralized session server group associated with a specific server.

    remove-central-session-server

    Disables a specific server from operating as a centralized session server.

    add-central-session-definition

    Adds or changes a server within a group in the centralized session server definition.

    remove-central-session-server-definition

    Removes a group from the centralized session server definition, or a server from the group.

    list-central-session-server-session

    Displays information about sessions that exist on the centralized session server.

    show-central-session-server-statistics

    Displays memory usage and session information of a running central session server.

1. Shared Options

The following options are shared by monitoring and control commands. Only one of the following options can be set.

  • [-server <server-name> ] option

    • This option is used to specify the server to which each command is applied. If this option is not set, the command is applied to the web engine of the currently connected server.

    • The description of this option is omitted from each command option description.

  1. For a configuration that is not immediately applied in the server, if a command is executed that reconfigures a pending configuration to the initial configuration, the "Restart the Server" message is not displayed.

  2. In JEUS Master Server, the option is required. If the command is executed from a Managed Server instead of JEUS Master Server, even if the options is not specified, the command is executed using the connected server.

2. list-session

Displays the information of sessions sorted in idle time.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    lisession, lss

  • Usage

    list-session -server <server-name>
                 [-s,--simple ]
                 [-count <count>]
                 [-target <manager-name>]
                 [-id <target-id>]
  • Parameters

    Parameter Description

    -server

    Specifies the target servers. This option is required.

    [-s,--simple ]

    Results are displayed in a simple format.

    [-count <count>]

    Number of sessions to be monitored. (Default value: 100)

    [-target <manager-name>]

    Target session manager whose session information will be displayed. If not set, information about all managers within a server will be displayed.

    [-id <target-id>]

    Session ID used to search for a session.

  • Example

    • No option is used.

      list-session -server server1
    • The [-s,--simple ] option is used.

      list-session -server server1 --simple

3. remove-session

Removes the sessions that have been idle during a specified period of time regardless of session timeout.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    rmsession, rms

  • Usage

    remove-session -server <server-name>
                   -time,--timeout <timeout(min)>
  • Parameters

    Parameter Description

    -server

    Specifies the target servers. This option is required.

    -time,--timeout <timeout(min)>

    Sets the timeout for removing a session. This option is required.

  • Example

    • The [-time,--timeout <timeout(min)>] option is used.

      remove-session -server server1 --timeout 3

4. show-session-server-backup-table

Displays the current backup table information of a session server.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    sssbt, sbt

  • Usage

    show-session-server-backup-table -server <server-name>
  • Parameters

    Parameter Description

    -server

    Specifies the target servers. This option is required.

  • Example

    show-session-server-backup-table -server server1

5. show-session-configuration

Displays session information.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    getsc, ssc

  • Usage

    show-session-configuration -server <server-name>
              [-h, --help]
  • Parameters

    Parameter Description

    [-server <server-name>]

    Displays the configurations about the sessions set in a web engine.

    [-h, --help]

    Displays usage and describes each parameter. Using this command without an option will have the same result.

  • Example

    • The [-server <server-name>] option is used.

      show-session-configuration -server server1

6. modify-session-configuration

Changes the session configurations.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    setsc, msc

  • Usage

    modify-session-configuration -server <server-name>
              [-f,--forceLock]
              [-to,--timeout <int timeout>]
              [-mc,--max-session-count <int limit count>]
              [-rp,--reload-persistent <boolean reload-persistent>]
              [-tmc,--tracking-mode.cookie <boolean enable-cookie>]
              [-tmu,--tracking-mode.url <boolean enable-url>]
              [-tms,--tracking-mode.ssl <boolean enable-ssl>]
              [-scn,--session-cookie.cookie-name <string cookie-name>]
              [-sucn,--session-cookie.url-cookie-name <string url-cookie-name>]
              [-scv,--session-cookie.version <int version(1 or 0)>]
              [-scd,--session-cookie.domain <string domain-scope>]
              [-scp,--session-cookie.path <string path-scope>]
              [-scm,--session-cookie.max-age <int max-age(sec)>]
              [-scs,--session-cookie.secure <boolean secure]
              [-sch,--session-cookie.http-only <boolean http-only>]
              [-sca,--session-cookie.same-site <string same-site>]
              [-scc,--session-cookie.comment <string comment>]
  • Parameters

    Parameter Description

    -server <server-name>

    Changes the configurations for the sessions set in a web engine. This option is required.

    [-f, --forceLock]

    Forcibly applies the configuration changes.

    [-to,--timeout <int timeout>]

    Session timeout of session-config.

    [-mc,--max-session-count <int maxCount>]

    Maximum number of sessions to be stored.

    [-rp,--reload-persistent <boolean reload-persistent>]

    Reload persistent of session-config.

    [-tmc,--tracking-mode.cookie <boolean enable-cookie>]

    Cookie for the session-config tracking mode.

    [-tmu,--tracking-mode.url <boolean enable-url>]

    URL rewriting for the session-config tracking mode.

    [-tms,--tracking-mode.ssl <boolean enable-ssl>]

    SSL for the session-config tracking mode.

    [-scn,--session-cookie.cookie-name <string cookie-name>]

    Session cookie name.

    [-sucn,--session-cookie.url-cookie-name <string url-cookie-name>]

    Session cookie name used when sending a session by using url rewriting

    [-scv,--session-cookie.version <int version(1 or 0)>]

    Compilation version of session cookies.

    [-scd,--session-cookie.domain <string domain-scope>]

    Determines the domain scope of session cookies.

    [-scp,--session-cookie.path <string path-scope>]

    Determines the path scope of session cookies.

    [-scm,--session-cookie.max-age <int max-age>]

    Determines the length of time to keep session cookies on a browser.

    [-scs,--session-cookie.secure <boolean secure>]

    Determines if a browser sends cookies only over SSL.

    [-sch,--session-cookie.http-only <boolean http-only>]

    Determines if a browser uses session cookies only for HTTP requests.

    [-sca,--session-cookie.same-site <string same-site>]

    Security to prevent session ID cookies from being used in an unintentional request (cross-site request forgery).

    [-scc,--session-cookie.comment <string comment>]

    Session cookie description when the cookie version is 1.

  • Example

    • The [-server <server-name>] option is used.

      modify-session-configuration -server server1 -to 40 -sh true -scs true

7. list-sessionstorages

Displays the existing session storage list.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    listsessionstorages, listss

  • Usage

    list-sessionstorages

8. add-sessionstorage

Adds a session storage to a session server. For multiple session storages to be added, each name of the session storage must be unique.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    addsessionstorage, addss, addsessionstor

  • Usage

    add-sessionstorage <session-storage-name>
                       [-provider <provider>]
                       [-property <property>]
                       [-csm,--centralSessionManager <target-group-name>]
  • Parameters

    Parameter Description

    <session-storage-name>

    Name of the session storage to add.

    [-provider <provider>]

    Provider of the session manager to use. Set a reserved word or the used package.

    Only one of the following reserved words can be specified:

    • DISTRIBUTE: Uses distributed session manager (server) provided by JEUS.

    • CENTRAL: Uses the centralized session manager provided by JEUS.

    • REDIS: Uses the Redis session manager provided by JEUS.

    • HAZELCAST: Uses the Hazelcast session manager provided by JEUS.

    • RUNTIME: If another provider exists, the provider is used. If not, the JEUS session manager is used.

    [-property <property >]

    Property of the session storage.

    [-csm <target-group-name>]

    Name of the centralized session server group.

  • Example

    add-sessionstorage sessionStorage1 -provider CENTRAL -property connect-timeout=10000,full-search-timeout=20000

9. remove-sessionstorage

Deletes a session storage from a session server.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    removess, rmss, removesessionstor, rmsessionstor, rm,sessionstorage

  • Usage

    remove-sessionstorage <session-storage-name>
  • Parameters

    Parameter Description

    <session-storage-name>

    Name of the session storage to delete.

    -csm <target-group-name>

    Name of the centralized session server group to delete.

  • Example

    remove-sessionstorage sessionStorage1

10. rename-sessionstorage

Changes the name of session storage.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    renamesessionstor, renamesessionstor

  • Usage

    rename-sessionstorage <session-storage-name>
                          -name <new-session-storage-name>
  • Parameters

    Parameter Description

    <session-storage-name>

    Name of the session storage to change.

    -name <new-session-storage-name>

    New session storage name. This option is required.

  • Example

    rename-sessionstorage sessionStorage1 -name new_sessionStorage

11. set-sessionstorage-property

Adds or changes a session storage property.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    setsessionstorageproperty, setsessionstorprop, setsstorprop

  • Usage

    set-sessionstorage-property <session-storage-name>
                               [-key <key-of-property> -value <value-of-property>] | [-property <property>]
  • Parameters

    Parameter Description

    <session-storage-name>

    Name of the session storage to add property.

    [-key <key-of-property>]

    Key of a property to add or change. Change the property value of an existing key if it is already configured, or add a new key if none is configured.

    This cannot be used with the [-property] option.

    [-value <value-of-property>]

    Value of the property to add or change.

    Required if the [-key] option is used.

    [-property <property >]

    Property to add or change. Change the property value of an existing key if it is already configured, or add a new key if none is configured.

    This cannot be used with the [-key] option.

    [-key] or [-property] must be specified.

  • Example

    • Example of using [-key <key-of-property> -value <value-of-property>] option

      set-sessionstorage-property sessionStorage1 -key full-search-timeout -value 10000
    • Example of using the [-property <property>] option

      set-sessionstorage-property sessionStorage1 -property full-search-timeout=10000,backup-queue-size=200

12. remove-sessionstorage-property

Deletes a session storage property.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    rmsessionstorageproperty, rmsessionstorprop, rmsstorprop

  • Usage

    remove-sessionstorage-property <session-storage-name>
                                   -key <key-of-property>
  • Parameters

    Parameter Description

    <session-storage-name>

    Name of the session storage from which to delete the property.

    -key <key-of-property>

    Key of the property to delete from the session storage. This option is required.

  • Example

    remove-sessionstorage-property sessionStorage1 -key full-search-timeout

13. add-sessionstorage-scope

Adds a scope to a session storage. For multiple scopes to be added, each scope must be unique.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    addsessionstoragescope, addssscope, addsessionstorscope, addsss

  • Usage

    add-sessionstorage-scope <scope-name>
                             -target <storage-name>
                             [-clusters <target-cluster-list> | -applications <target-application-list>]
  • Parameters

    Parameter Description

    <scope-name>

    Name of a session scope to add.

    -target <storage-name>

    Name of the session storage to add a scope. Required.

    [-clusters <target-cluster-list>]

    Cluster list to be included in the scope. It cannot be used with the [-applications] option.

    [-applications <target-application-list>]

    Application list to be included in the scope. It cannot be used with the [-clusters] option.

  • Example

    • Example of using the [-clusters <target-cluster-list> ] option

      add-sessionstorage-scope scope1 -target sessionStorage -clusters cluster1,cluster2
    • Example of using [-applications <target-application-list>] option

      add-sessionstorage-scope scope1 -target sessionStorage -applications app1,app2

14. set-sessionstorage-scope

Changes an application or cluster that will be included in a scope. The existing target-application or targe-cluster is deleted and newly configured.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    setsessionstoragescope, setsessionstorscope, setsss, setssscope

  • Usage

    set-sessionstorage-scope <scope-name>
                            [-clusters <target-cluster-list> | -applications <target-application-list>]
  • Parameters

    Parameter Description

    <scope-name>

    Name of a session scope to add.

    [-clusters <target-cluster-list>]

    Cluster list to be included in the scope. It cannot be used with the [-applications] option.

    [-applications <target-application-list>]

    Application list to be included in the scope. It cannot be used with the [-clusters] option.

  • Example

    • Example of using the [-clusters <target-cluster-list> ] option

      set-sessionstorage-scope scope1 -clusters cluster1,cluster2
    • Example of using [-applications <target-application-list>] option

      set-sessionstorage-scope scope1 -applications app1,app2

15. remove-sessionstorage-scope

Deletes a scope from a session storage.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    removessscope, rmssscope, rmsessionstorscope, removesessionstoragescope

  • Usage

    remove-sessionstorage-scope <scope-name>
  • Parameters

    Parameter Description

    <scope-name>

    Name of the session scope to delete.

  • Example

    remove-sessionstorage-scope scope1

16. set-sessionstorage-scope-session-config

Sets the session configuration to be used in the context within a scope.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    setsessionstoragescopesessionconfig, setssssc, setsessionstorscopesc

  • Usage

    set-sessionstorage-scope-session-config <scope-name>
                                      [-timeout <timeout>]
                                      [-msc, --max-session-count <limit-count>]
                                      [-rp, --reload-persistent <reload-persistent>]
                                      [-tm, --tracking-mode <tracking-mode>]
                                      [-sc, --session-cookie <session-cookie>]
  • Parameters

    Parameter Description

    <scope-name>

    Name of the scope to set session configuration.

    [-timeout <timeout>]

    Session timeout of session-config. (Default value: 30)

    [-msc, --max-session-count <limit-count>]

    Maximum number of sessions to be stored. (Default value: -1 (Unlimited))

    [-rp, --reload-persistent <reload-persistent>]

    Reload persistent of session-config. (Default value: false)

    [-tm, --tracking-mode <tracking-mode>]

    Property to add or change. Change the property value of an existing key if it is already configured, or add a new key if none is configured.

    Key of the property:

    • cookie: Sets cookie for the session-config tracking mode. The value type is Boolean. (Default value: true)

    • url: Sets URL rewriting for the session-config tracking mode. The value type is Boolean. (Default value: false)

    • ssl: Sets SSL for the session-config tracking mode. The value type is Boolean. (Default value: false)

    [-sc, --session-cookie <session-cookie>]

    Property to add or change. Change the property value of an existing key if it is already configured, or add a new key if none is configured.

    Key of the property:

    • cookie-name: Sets a session cookie name when the cookie is used to send the session. The value type is string. (Default value: JSESSIONID)

    • url-cookie-name: Sets a session cookie name when url rewriting is used to send the session. The value type is string. (Default value: jsessionid)

    • version: Sets cookie ID version. The value type is integer. (Default value: 0)

    • domain: Sets a domain name to apply the session cookie. The value type is string that contains at least one character.

    • path: Sets a path to apply the session cookie. The value type is string that contains at least one character.

    • max-age: Sets the length of time to keep the session cookie on browser. The value type is integer. (Default value: -1)

    • secure: Sets secure property of the session ID cookie. If set to true, the session ID cookie is only sent to the secure HTTP connection. The value type is Boolean. (Default value: false)

    • http-only: Determines if a browser uses the session cookie only for HTTP reqeusts. The value type is Boolean. (Default value: true)

    • same-site: Sets the security option to prevent attacks (Cross-Site Request Forgery) wherein the session cookie ID is used for unintended requests. The value type is one of the following: None, Strict, Lax or Disable.

    • comment: Records purposes or description of the cookie. The value type is string that contains at least one character.

  • Example

    set-sessionstorage-scope-session-config scope1 -timeout 20
    -shared true -session-cookie secure=true,http-only=true,path=/ -tracking-mode cookie=true

17. list-sessionserver-property

Displays a list of session server properties.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    listsessionserverproperty, listssp, listsessionservprop

  • Usage

    list-sessionserver-property

18. set-sessionserver-property

Adds or changes a session server property.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    setsessionserverproperty, setsessionservprop, setsservprop

  • Usage

    set-sessionserver-property [-key <key-of-property> -value <value-of-property>] | [-property <property>]
  • Parameters

    Parameter Description

    [-key <key-of-property>]

    Key of a property to add or change. Change the property value of an existing key if it is already configured, or add a new key if none is configured.

    This cannot be used with the [-property] option.

    [-value <value-of-property>]

    Value of the property to add or change.

    Required if the [-key] option is used.

    [-property <property>]

    Property to add or change. Change the property value of an existing key if it is already configured, or add a new key if none is configured.

    This cannot be used with the [-key] option.

    [-key] or [-property] must be specified.

  • Example

    • Example of using [-key <key-of-property> -value <value-of-property>] option

      set-sessionserver-property -key encoding-rule -value base64
    • Example of using the [-property <property>] option

      set-sessionserver-property -property encoding-rule=raw

19. remove-sessionserver-property

Deletes a session server property.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    removesessionserverproperty, rmsessionservprop, rmsservprop

  • Usage

    remove-sessionserver-property -key <key-of-property>
  • Parameters

    Parameter Description

    -key <key-of-property>

    Key of the property to delete from a session server.

  • Example

    remove-sessionserver-property -key excluded-servers

20. add-central-session-server

Sets a specific server to operate as a centralized session server.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    addcss, add-css

  • Usage

    add-central-session-server <server-name> -g <group-name>
  • Parameters

    Parameter Description

    <server-name>

    Name of the target server to act as a centralized session server.

    -g <group-name>

    Target group name set in the central session server definition.

  • Example

    add-central-session-server server1 -g central1

21. modify-central-session-server

Modifies the centralized session server group associated with a specific server.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    mvcss, mv-css

  • Usage

    modify-central-session-server <server-name> -g <group-name>
  • Parameters

    Parameter Description

    <server-name>

    Name of the target server to change.

    -g <group-name>

    Name of the centralized session server group to change.

  • Example

    modify-central-session-server server1 -g central2

22. remove-central-session-server

Disables a specific server from operating as a centralized session server.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    rmcss, rm-css

  • Usage

    remove-central-session-server <server-name>
  • Parameters

    Parameter Description

    <server-name>

    Name of the server to exclude from the central session server.

  • Example

    remove-central-session-server server1

23. add-central-session-server-definition

Adds or changes (primary and backup) servers within a group in the centralized session server definition.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    add-central-session-def, addcsd, add-csd

  • Usage

    add-central-session-server-definition -g <group-name> -p <primary> [-b <backup>]
  • Parameters

    Parameter Description

    -g <group-name>

    Name of the target group to which the server is added.

    -p <primary>

    Primary server address.

    Specify in 'IP(hostname):port' format.

    [-b <backup>]

    Backup server address.

    Specify in 'IP(hostname):port' format.

    When specifying multiple values, separate them with commas (,).

  • Example

    add-central-session-server-definition -g central1 -p localhost:9736 -b localhost:19736,localhost:29736

24. remove-central-session-server-definition

Removes a group from the centralized session server definition, or a server from the group.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    remove-central-session-def, rmcsd, rm-csd

  • Usage

    remove-central-session-server-definition -g <group-name> [-p <primary>] [-b <backup>]
  • Parameters

    Parameter Description

    -g <group-name>

    Name of the target group to remove.

    [-p <primary>]

    Primary server address of the target group to remove.

    At least one server must be maintained in the setup.

    [-b <backup>]

    Backup server address of the target group to remove.

    Specify in 'IP(hostname):Port' format. When specifying multiple values, separate them with commas (,).

  • Example

    remove-central-session-server-definition -g central1 -p localhost:9736 -b localhost:9735
    remove-central-session-server-definition -g central1 -p localhost:9736
    remove-central-session-server-definition -g central2

25. list-central-session-server-session

Displays information about sessions that exist on the centralized session server.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    list-css-session, lscsss

  • Usage

    list-central-session-server-session [-server <server-name>] [-a,--address <server-address>] [-c,--count <count> ] [-i,--id <expectedToContain>] [-s,--simple]
  • Parameters

    Parameter Description

    [-server <server-name>]

    Name of the session server within the same domain.

    [-a,--address <server-address>]

    Address of the session server to show.

    [-c,--count <count>]

    Number of sessions to query. (Default: 100)

    [-i,--id <expectedToContain>]

    Used to show sessions that contain the specified string.

    [-s,--simple]

    Used to briefly display the output format.

  • Example

    list-central-session-server-session -a localhost:19736

26. show-central-session-server-statistics

Displays memory usage and session information of a running central session server.

  • Related schema

    jeus-session-server.xsd, jeus-session-domain.xsd

  • Alias

    cssst, stcss, css-stat

  • Usage

    show-central-session-server-statistics [-server <server-name>] [-a,--address <server-address>] [-s,--session] [-m,--memory]
  • Parameters

    Parameter Description

    [-server <server-name>]

    Name of the session server within the same domain.

    [-a,--address <server-address>]

    Address of the session server to show.

    [-s,--session]

    Displays information about the session server, including its name, number of sessions, and backup server.

    [-m,--memory]

    Displays the memory usage status of the configured server JVM.

  • Example

    show-central-session-server-statistics -a localhost:19736