Configure a unique HTTP session clone ID for each application server using scripting
Use scripting and the wsadmin tool to configuring a unique HTTP session clone ID for each application server.
Start the wsadmin scripting client.Perform the following steps 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 the configuration.
- server is the affected server within the configuration.
- cell is the affected cell within the configuration.
- unique_value is 8 to 9 unique alphanumeric characters. For example, test1234.
Tasks
- 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/]
Example output:
server(cells/cell/nodes/node/servers/server|server.xml#Server_1265038035855)
- Jython:
server = AdminConfig.getid('/Node:node/Server:server/')
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/nodes/node/servers/server|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/nodes/node/servers/server|server.xml#Property_1265840905884)
- Jython:
AdminConfig.create('Property', wc, '[[validationExpression ""][name "HttpSessionCloneId"] [description ""][value "value"][required "false"]]')
Example output:
'HttpSessionCloneId(cells/cell/nodes/node/servers/server|server.xml#Property_1265841318634)'
- Save the configuration changes. See documentation on saving configuration changes with the wsadmin tool.
Save wsadmin configuration changes wsadmin AdminConfig Commands for the AdminConfig object Session management custom properties