Configure a unique HTTP session clone ID for each application server
Use scripting and wsadmin.sh to configuring a unique HTTP session clone ID for each application server.
Before starting this task, wsadmin.sh must be running. See the Start the wsadmin scripting client topic for more information.
To configure a unique HTTP session clone ID for each application server. Within these steps, the following variables apply to the Jython and Jacl commands:
- node is the affected node within our configuration.
- server_name is the affected server within our configuration.
- cell_name is the affected cell within our configuration.
- unique_value is 8 to 9 unique alphanumeric characters. For example, test1234.
- Retrieve the node name and server name values. Assign those two values to the server variable.
Jacl:
set server [$AdminConfig getid /Node:node/Server:server_name/]
Example output:
server_name(cells/cell_name/nodes/node/servers/ server_name|server.xml#Server_1265038035855)
Jython:
server = AdminConfig.getid('/Node:node/Server:server_name/')
Example output: None
- Retrieve the name of the web container, which is associated with the node and server values that are identified in the previous step, and assign the value to the wc variable.
Jacl:
set wc [$AdminConfig list WebContainer $server]
Example output:
(cells/cell_name/nodes/node/servers/server_name |server.xml#WebContainer_1265038035855)
Jython:
wc = AdminConfig.list('WebContainer', server)
Example output: None
- Create the HTTPSessionCloneId custom property using the node, server, and web container values that were assigned in the previous steps.
Jacl:
$AdminConfig create Property $wc {{name "HttpSessionCloneId"} {description ""} {value "value"} { required "false"}}
Example output:
HttpSessionCloneId(cells/cell_name/nodes/node/servers/ server_name|server.xml#Property_1265840905884)
Jython:
AdminConfig.create('Property', wc, '[[validationExpression ""][name "HttpSessionCloneId"] [description ""][value "value"][ required "false"]]')Example output:
'HttpSessionCloneId(cells/cell_name/nodes/node/servers/ server_name|server.xml#Property_1265841318634)'
- Save the configuration changes. For more information, see the documentation on saving configuration changes with wsadmin.sh.
Related tasks
Saving configuration changes with wsadmin.sh Use the wsadmin scripting AdminConfig object for scripted administration
Commands for the AdminConfig object Session management custom properties