Specifying configuration objects using the wsadmin tool

Why and when to perform this task

To manage an existing configuration object, you identify the configuration object and obtain configuration ID of the object to be used for subsequent manipulation.

Steps for this task

  1. Invoke the AdminConfig object commands interactively, in a script, or use the wsadmin -c command from an operating system command prompt.
  2. Obtain the configuration ID with one of the following ways:
    • Obtain the ID of the configuration object with the getid command, for example:

      Using Jacl:

      set var [$AdminConfig getid /type:name/]
      where:
      set is a Jacl command
      var is a variable name
      $ is a Jacl operator for substituting a variable name with its value
      AdminConfig is an object representing the WebSphere Application Server configuration
      getid is an AdminConfig command
      /type:name/ is the hierarchical containment path of the configuration object
      type is the object type

      Note: The name of the object type that you input here is the one based on the XML configuration files and does not have to be the same name that the administrative console displays.

      name is the optional name of the object


      You can specify multiple /type:name/ in the string, for example, /type:name/type:name/type:name/. If you just specify the type in the containment path without the name, include the colon, for example, /type:/. The containment path must be a path containing the correct hierarchical order. For example, if you specify /Server:server1/Node:node/ as the containment path, you will not receive a valid configuration ID because Node is parent of Server and should come before Server in the hierarchy.

      This command returns all the configuration IDs that match the representation of the containment and assigns them to a variable.

      To look for all the server configuration IDs resided in mynode, use the following example:

      Using Jacl:

      set nodeServers [$AdminConfig getid /Node:mynode/Server:/]

      To look for server1 configuration ID resided in mynode, use the following example:

      Using Jacl:

      set server1 [$AdminConfig getid /Node:mynode/Server:server1/]

      To look for all the server configuration IDs, use the following example:

      Using Jacl:

      set servers [$AdminConfig getid /Server:/]
    • Obtain the ID of the configuration object with the list command, for example:

      Using Jacl:

      set var [$AdminConfig list type]
      or
      set var [$AdminConfig list type scopeId]
      where:
      set is a Jacl command
      var is a variable name
      $ is a Jacl operator for substituting a variable name with its value
      AdminConfig is an object representing the WebSphere Application Server configuration
      list is an AdminConfig command
      type is the object type

      Note: The name of the object type that you input here is the one based on the XML configuration files and does not have to be the same name that the administrative console displays.

      scopeId is the configuration ID of a cell, node, or server object


      This command returns a list of configuration object IDs of a given type. If you specify the scopeId, the list of objects returned is within the scope specified. The list returned is assigned to a variable.

      To look for all the server configuration IDs, use the following example:

      Using Jacl:

      set servers [$AdminConfig list Server]

      To look for all the server configuration IDs in mynode, use the following example:

      Using Jacl:

      set scopeid [$AdminConfig getid /Node:mynode/]
      set nodeServers [$AdminConfig list Server $scopeid]
  3. If there are more than more configuration IDs returned from the getid or list command, the IDs are returned in a list syntax. One way to retrieve a single element from the list is to use the lindex command. The following example retrieves the first configuration ID from the server object list:

    Using Jacl:

    set allServers [$AdminConfig getid /Server:/]
    set aServer [lindex $allServers 0]
    For other ways to manipulate the list and then perform pattern matching to look for a specified configuration object, refer to the Jacl syntax.

Results

You can now use the configuration ID in any subsequent AdminConfig commands that require a configuration ID as a parameter.



Searchable topic ID:   txml_specifyconfig
Last updated: Jun 21, 2007 9:56:50 PM CDT    WebSphere Application Server for z/OS, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/txml_specifyconfig.html

Library | Support | Terms of Use | Feedback