ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatz_5.4.0.1/51/admin/appwebsess.htm

111 lines
5.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Configure session management for Web modules</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h4><a name="appwebsess"></a>Configure session management for Web modules</h4>
<p>Application Web modules use sessions to associate HTTP requests from a single client. Session management settings determine how your application manages HTTP sessions.</p>
<p>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.</p>
<ul>
<li><a href="#acappwebsess">Use the administrative console to configure session management for Web modules</a></li>
<li><a href="#wsaappwebsess">Use wsadmin to configure session management for Web modules</a></li>
</ul>
<p><strong><a name="acappwebsess">Use the administrative console to configure session management for Web modules</a></strong></p>
<ol>
<li><a href="acstart.htm">Start the administrative console</a>.</li>
<li>Expand <strong>Applications</strong> and click <strong>Enterprise Applications</strong>.</li>
<li>Click the name of the application for which you want to manage session tracking.</li>
<li>On the application's page, click <strong>Web Modules</strong>.</li>
<li>Click the URI for the Web module for which you want to configure session tracking.</li>
<li>On the Web module's page, click <strong>Session Management</strong>.</li>
<li>Configure session management settings.</li>
<li>Click <strong>Apply</strong> or <strong>OK</strong>.</li>
<li><a href="acsave.htm">Save the application server configuration</a>.</li>
</ol>
<p><strong><a name="wsaappwebsess">Use wsadmin to configure session management for Web modules</a></strong></p>
<ol>
<li><p>On the CL command line, run the STRQSH (Start Qshell) command.</p></li>
<li><p>Run the cd command to change to the directory that contains the wsadmin tool:</p>
<pre>cd /QIBM/ProdData/WebASE51/ASE/bin</pre></li>
<li><p><a href="wsarun.htm#start">Start wsadmin</a>.</p></li>
<li><p>At the wsadmin prompt, run this command to identify the deployment configuration object for the application and assign it to the deployment variable:</p>
<pre>set deployment [$AdminConfig getid /Deployment:<em>myApp</em>/]</pre>
<p>where <em>myApp</em> is the name of the application for which you want to configure session management.</p></li>
<li><p>Run these commands to list all of the modules in the application and assign them to the modules variable:</p>
<pre>set appDeploy [$AdminConfig showAttribute $deployment deployedObject]
set modules [lindex [$AdminConfig showAttribute $appDeploy modules] 0]</pre></li>
<li><p>Use the attributes command to display a list of the attributes that you can set for the session manager:</p>
<pre>$AdminConfig attributes SessionManager</pre>
<p>The command displays this output:</p>
<pre>&quot;accessSessionOnTimeout Boolean&quot;
&quot;allowSerializedSessionAccess Boolean&quot;
&quot;context ServiceContext@&quot;
&quot;defaultCookieSettings Cookie&quot;
&quot;enable Boolean&quot;
&quot;enableCookies Boolean&quot;
&quot;enableProtocolSwitchRewriting Boolean&quot;
&quot;enableSSLTracking Boolean&quot;
&quot;enableSecurityIntegration Boolean&quot;
&quot;enableUrlRewriting Boolean&quot;
&quot;maxWaitTime Integer&quot;
&quot;properties Property(TypedProperty)*&quot;
&quot;sessionDRSPersistence DRSSettings&quot;
&quot;sessionDatabasePersistence SessionDatabasePersistence&quot;
&quot;sessionPersistenceMode ENUM(DATABASE, DATA_REPLICATION, NONE)&quot;
&quot;tuningParams TuningParams&quot;</pre>
<p><strong>Notes:</strong></p>
<ul>
<li>The sessionDRSPersistence attribute is not supported in WebSphere Application Server - Express.</li>
<li>In WebSphere Application Server - Express, the only supported value for sessionPersistenceMode is NONE.</li>
</ul><p></p></li>
<li><p>Set attributes for the session manager. For example, run these commands to set the <tt>enableSecurityIntegration</tt>, <tt>maxWaitTime</tt>, <tt>sessionPersistenceMode</tt>, and <tt>enable</tt> attributes</p>
<pre>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]</pre>
<p>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.</p></li>
<li><p>Run these commands to set the attributes for Web module:</p>
<pre>set nameAttr [list name <em>myWebModuleConfig</em>]
set descAttr [list description &quot;<em>myWebModuleDescription</em>&quot;]
set webAttrs [list $nameAttr $descAttr $sessionMgr]</pre>
<p>where <em>myWebModuleConfig</em> is the name for the configuration and <em>myWebModuleDescription</em> is a brief description of the configuration.</p></li>
<li><p>Create the session manager for each Web module in the application:</p>
<pre>foreach module $modules {
if {[regexp WebModuleDeployment $module] == 1} {
$AdminConfig create WebModuleConfig $module $webAttrs
}
}</pre>
<p>You can modify this example to set other attributes of session manager in Web module configuration.</p></li>
<li><p>Run this command to save your changes:</p>
<pre>$AdminConfig save</pre></li>
</ol>
</body>
</html>