1. 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 Displays the information of sessions sorted by idle time.
Removes sessions that have been idle during a specified period of time regardless of a session timeout.
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 Displays session information.
Changes the session configurations.
-
Session server commands
These commands are used for session storage configuration. To apply the configuration, server must restart.
Command Description Displays the existing session storage list.
Adds a session storage to a session server. For multiple session storages to be added, each name of the session storage must be unique.
Deletes a session storage from a session server.
Changes the name of session storage.
Adds or changes a session storage property.
Deletes a session storage property.
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.
Changes an application or cluster that will be included in a scope.
Deletes a scope from a session storage.
Sets session configuration to be used in the context within a scope.
Displays a list of session server properties.
Adds or changes a session server property.
Deletes a session server property.
Sets up JEUS’s internal central session server.
1.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.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 [-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
-
1.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 [-time,--timeout <timeout(min)>]
Sets the timeout for removing a session.
-
Example
-
The [-time,--timeout <timeout(min)>] option is used.
remove-session -server server1 --timeout 3
-
1.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>]
-
Example
show-session-server-backup-table -server server1
1.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
-
1.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.
[-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
-
1.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
1.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>]
-
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.
Use the entire package name except for the reserved words. (e.g. jeus.session.impl.distributed.JeusDistributedWebSessionManagerProvider)
Reserved words:
-
JEUS: Uses the default 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.
-
-
Example
add-sessionstorage sessionStorage1 -provider JEUS -property connect-timeout=10000,full-search-timeout=20000
1.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.
-
Example
remove-sessionstorage sessionStorage1
1.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.
-
Example
rename-sessionstorage sessionStorage1 -name new_sessionStorage
1.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.
-
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
-
1.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.
-
Example
remove-sessionstorage-property sessionStorage1 -key full-search-timeout
1.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.
[-sessionType <jeus-session-type>]
Sets the type of the session server to use when the provider is JEUS. If the storage provider is not JEUS, this setting is ignored. (Default: DISTRIBUTED)
-
CENTRAL: Uses the JEUS internal central session server.
-
DISTRIBUTED: Uses the JEUS distributed session server.
-
-
Example
-
Example of using the [-clusters <target-cluster-list> ] option
add-sessionstorage-scope scope1 -target sessionStorage -clusters cluster1,cluster2 -sessionType DISTRIBUTED
-
Example of using [-applications <target-application-list>] option
add-sessionstorage-scope scope1 -target sessionStorage -applications app1,app2 -sessionType CENTRAL
-
1.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.
[-sessionType <jeus-session-type>]
Sets the type of the session server to use when the provider is JEUS. If the storage provider is not JEUS, this setting is ignored. (Default: DISTRIBUTED)
-
CENTRAL: Uses the JEUS internal central session server.
-
DISTRIBUTED: Uses the JEUS distributed session server.
-
-
Example
-
Example of using the [-clusters <target-cluster-list> ] option
set-sessionstorage-scope scope1 -clusters cluster1,cluster2 -sessionType DISTRIBUTED
-
Example of using [-applications <target-application-list>] option
set-sessionstorage-scope scope1 -applications app1,app2
-
1.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
1.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
1.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
1.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.
-
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
-
1.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
1.20. set-jeus-central-session-server
Sets up JEUS’s internal central session server.
-
Related schema
jeus-session-server.xsd, jeus-session-domain.xsd
-
Alias
setjcss, setcentralss
-
Usage
set-jeus-central-session-server -primary <primary central session server> -seconday <secondary central session server>
-
Parameters
Parameter Description -primary <primary central session server>
Name of the server to use as the primary session server.
-seconday <secondary central session server>
Name of the server to use as the secondary session server.
-
Example
set-jeus-central-session-server -primary server1 -secondary server2