Modify configuration objects with the wsadmin tool

 

Procedure

  1. Start wsadmin

  2. Retrieve the configuration ID of the objects that you want to modify, for example:

    • Jacl:

      set jdbcProvider1 [$AdminConfig getid /JDBCProvider:myJdbcProvider/]
      
      

    • Jython

      jdbcProvider1 = AdminConfig.getid('/JDBCProvider:myJdbcProvider/')
      

    where:

    set is a Jacl command
    jdbcProvider1 is a variable name
    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object that represents the WAS configuration
    getid is an AdminConfig command
    /JDBCProvider:myJdbcProvider/ is the hierarchical containment path of the configuration object
    JDBCProvider is the object type
    myJdbcProvider is the optional name of the object

  3. Show the current attribute values of the configuration object with the show command, for example:

    • Jacl:

      $AdminConfig show $jdbcProvider1
      

    • Jython

      AdminConfig.show(jdbcProvider1)
      

    where:

    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object that represents the WAS configuration
    show is an AdminConfig command
    jdbcProvider1 evaluates to the ID of the host node that is specified in step number 1

  4. Modify the attributes of the configuration object, for example:

    • Jacl:

      $AdminConfig modify $jdbcProvider1 {{description "This is my new description"}}
      

    • Jython list

      AdminConfig.modify(jdbcProvider1, [['description', "This is my new description"]])
      

    • Jython string

      AdminConfig.modify(jdbcProvider1, '[[description "This is my new description"]]')
      

    where:

    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object that represents the WAS configuration
    modify is an AdminConfig command
    jdbcProvider1 evaluates to the ID of the host node that is specified in step number 1
    description is an attribute of server objects
    This is my new description is the value of the description attribute
    We can also modify several attributes at the same time. For example:

    • Jacl:

      {{name1 val1} {name2 val2} {name3 val3}}
      $AdminConfig save
      

    • Jython list

      [['name1', 'val1'], ['name2', 'val2'], ['name3', 'val3']]
      

    • Jython string

      '[[name1 val1] [name2 val2] [name3 val3]]'
      

  5. In a network deployment environment only, synchronize the node.


 

See Also


AdminConfig object for scripted administration

 

See Also


Commands for the AdminConfig object