Application Web modules use sessions to associate HTTP requests from a single client. Session management settings determine how your application manages HTTP sessions.
You can configure sessions for a Web module if you want the module to use different settings from other Web modules that are deployed on your application server, including other Web modules in the same application. The Web module settings take precedence over the application and application server settings.
Use the administrative console to configure session management for Web modules
Use wsadmin to configure session management for Web modules
On the CL command line, run the STRQSH (Start Qshell) command.
Run the cd command to change to the directory that contains the wsadmin tool:
cd /QIBM/ProdData/WebASE51/ASE/bin
At the wsadmin prompt, run this command to identify the deployment configuration object for the application and assign it to the deployment variable:
set deployment [$AdminConfig getid /Deployment:myApp/]
where myApp is the name of the application for which you want to configure session management.
Run these commands to list all of the modules in the application and assign them to the modules variable:
set appDeploy [$AdminConfig showAttribute $deployment deployedObject] set modules [lindex [$AdminConfig showAttribute $appDeploy modules] 0]
Use the attributes command to display a list of the attributes that you can set for the session manager:
$AdminConfig attributes SessionManager
The command displays this output:
"accessSessionOnTimeout Boolean" "allowSerializedSessionAccess Boolean" "context ServiceContext@" "defaultCookieSettings Cookie" "enable Boolean" "enableCookies Boolean" "enableProtocolSwitchRewriting Boolean" "enableSSLTracking Boolean" "enableSecurityIntegration Boolean" "enableUrlRewriting Boolean" "maxWaitTime Integer" "properties Property(TypedProperty)*" "sessionDRSPersistence DRSSettings" "sessionDatabasePersistence SessionDatabasePersistence" "sessionPersistenceMode ENUM(DATABASE, DATA_REPLICATION, NONE)" "tuningParams TuningParams"
Notes:
Set attributes for the session manager. For example, run these commands to set the enableSecurityIntegration, maxWaitTime, sessionPersistenceMode, and enable attributes
set attr1 [list enableSecurityIntegration true] set attr2 [list maxWaitTime 30] set attr3 [list sessionPersistenceMode NONE] set attr4 [list enable true] set attrs [list $attr1 $attr2 $attr3 $attr4] set sessionMgr [list sessionManagement $attrs]
You can set attributes in the session manager, including the nested attributes in Cookie, DRSSettings, SessionDataPersistence, and TuningParms object types. To list the attributes for those object types, run the attribute command for each object type.
Run these commands to set the attributes for Web module:
set nameAttr [list name myWebModuleConfig] set descAttr [list description "myWebModuleDescription"] set webAttrs [list $nameAttr $descAttr $sessionMgr]
where myWebModuleConfig is the name for the configuration and myWebModuleDescription is a brief description of the configuration.
Create the session manager for each Web module in the application:
foreach module $modules { if {[regexp WebModuleDeployment $module] == 1} { $AdminConfig create WebModuleConfig $module $webAttrs } }
You can modify this example to set other attributes of session manager in Web module configuration.
Run this command to save your changes:
$AdminConfig save