Disabling a component

An example of disabling the name server component of a configured server follows. One can modify this example to disable a different component.

  • Identify the server and assign it to the server variable.

    set server [$AdminConfig getid /Cell:cellname/Node:nodename/Server:servername/]
    

    Example output:

    servername(cells/cellname/nodes/nodename/servers/servername:server.xml#Server_1)
    

  • List the components belonging to the server and assign them to the components variable.

    set components [$AdminConfig list Component $server]
    

    The components variable contains a list of components.

    Example output:

    (cells/cellname/nodes/nodename/servers/servername:server.xml#ApplicationServer_1)
    (cells/cellname/nodes/nodename/servers/servername:server.xml#EJBContainer_1)
    (cells/cellname/nodes/nodename/servers/servername:server.xml#NameServer_1)
    (cells/cellname/nodes/nodename/servers/servername:server.xml#WebContainer_1)
    

  • Identify the name server component and assign it to the nameServer variable.

    Since the name server component is the third element in the list, retrieve this element by using index 2.

    set nameServer [lindex $components 2]
    

    Example output:

    (cells/cellname/nodes/nodename/servers/servername:server.xml#NameServer_1)
    

  • Disable the name server component by changing the nested initialState attribute belonging to the stateManagement attribute.

    $AdminConfig modify $nameServer {{stateManagement {{initialState STOP}}}}
    

  • Save changes:

    $AdminConfig save
    

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.