Change the console session expiration

 

+

Search Tips   |   Advanced Search

 

 

Run this JACL script to set how long Integrated Solutions Console can be used until the login session expires.

 

Overview

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

  1. Copy the following script into a file.

    set dep [$AdminConfig getid /Deployment:adminconsole/]
    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 {}]
    
             ### 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 
        $AdminConfig  create TuningParams  $sesMgmt {{invalidationTimeout <timeout value>}}  
    
    } else 
    {
         ### Modify the existing one
         $AdminConfig modify $tuningParams {{invalidationTimeout <timeout value>}}  
    
    }
    
    ### Save the configuration changes
    $AdminConfig save
    
    
    

  2. 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.

  3. Save to filename timeout.jacl

  4. Execute...

    cd <WAS-install>/profiles/<profile_name>/bin
    wsadmin -f timeout.jacl