Run this JACL script to set how long Integrated Solutions Console
can be used until the login session expires.
About this task
The following JACL script serves as an example of how to set the
duration that an Integrated Solutions Console can be used until the login
session expires. Other scripting types, such as JYTHON, could be used.
Procedure
- Copy the following script into a file.
set dep [$AdminConfig getid /Deployment:isclite/]
set appDep [$AdminConfig list ApplicationDeployment $dep]
set sesMgmt [$AdminConfig list SessionManager $appDep]
# check if existing sesMgmt there or not, if not then create a new one, if exist then modify it
if {$sesMgmt == ""} {
# get applicationConfig to create new SessionManager
set appConfig [$AdminConfig list ApplicationConfig $appDep]
if {$appConfig == ""} {
# create a new one
set appConfig [$AdminConfig create ApplicationConfig $appDep {}]
# then create a new SessionManager using new Application Config just created
set sesMgmt [$AdminConfig create SessionManager $appConfig {}]
} else {
# create new SessionManager using the existing ApplicationConfig
set sesMgmt [$AdminConfig create SessionManager $appConfig {}]
}
}
# get tuningParams config id
set tuningParams [$AdminConfig showAttribute $sesMgmt tuningParams]
if {$tuningParams == ""} {
# create a new tuningParams
# to disable the session expiration, set the value to -1
$AdminConfig create TuningParams $sesMgmt {{invalidationTimeout <timeout value>}}
} else {
# modify the existing one
# to disable the session expiration, set the value to -1
$AdminConfig modify $tuningParams {{invalidationTimeout <timeout value>}}
}
# saving the configuration changes
$AdminConfig save
- Change the <timeout value> on the two lines of this sample to the new
session expiration value. This number specifies the number of minutes the console preserves the
session during inactivity.
- Save the file to any directory using, for example, the filename
timeout.jacl.
Avoid trouble: Make sure not to end the file name with the
.py
extension. It is not possible to run a file as a Jacl script after it receives
the *.py
extension.
- Start the wsadmin scripting client from
the <WAS-install>/profiles/<profile_name>/bin directory.
- Issue the following command.
wsadmin -f <path to jacl file>/timeout.jacl
When the selected file name does not contain the .jacl
extension,
incorporate -lang jacl
into the command.