WAS v8.5 > Script the application serving environment (wsadmin) > Configure servers with scripting

Configure a unique HTTP session clone ID for each application server using scripting

We can use scripting and wsadmin to configuring a unique HTTP session clone ID for each application server.

Before starting this task, wsadmin must be running. See the Start the wsadmin scripting client using wsadmin.sh topic for more information. Configure a unique HTTP session clone ID for each application server. Within these steps, the following variables apply to the Jython and Jacl commands:

  1. Retrieve the node name and server name values. Assign those two values to the server variable.

    • Jacl:

        set server [$AdminConfig getid /Node:node_name/Server:server_name/]

      Example output:

      server_name(cells/cell_name/nodes/node_name/servers/
      server_name|server.xml#Server_1265038035855)
    • Jython:

        server = AdminConfig.getid('/Node:node_name/Server:server_name/')

      Example output: None

  2. 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_name/servers/server_name
      |server.xml#WebContainer_1265038035855)
    • Jython:

        wc = AdminConfig.list('WebContainer', server)

      Example output: None

  3. 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_name/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_name/servers/
      server_name|server.xml#Property_1265841318634)'

  4. Save the configuration changes. For more information, see the documentation on saving configuration changes with wsadmin.


Related


Save configuration changes with wsadmin
Use the wsadmin scripting AdminConfig object for scripted administration


Reference:

Commands for the AdminConfig object using wsadmin.sh
Session management custom properties


+

Search Tips   |   Advanced Search