Modify nested attributes with the wsadmin tool
- Invoke the AdminConfig object
- Obtain the configuration ID of the object:
set t1 [$AdminConfig getid "/DataSource:ObjectName"/]- Modify one of the object parents and specify the location of the nested attribute within the parent:
$AdminConfig modify $t1 {{connectionPool {{reapTime 2003}}}}- Save the configuration by issuing an AdminConfig save command:
$AdminConfig saveUse the reset command of the AdminConfig object to undo changes that you made to your workspace since your last save.
Usage scenario
An alternative way to modify nested attributes is to modify the nested attribute directly:
set techsamp [$AdminConfig getid /DataSource:TechSamp/] set poolattribute [$AdminConfig show $techsamp connectionPool] set pool [lindex [lindex $poolattribute 0] 1] $AdminConfig modify $pool {{reapTime 2003}}In this example, the first command gets the configuration id of the DataSource, and the second command gets the connectionPool attribute. You need the third command because show returns a list of name and value pairs, and you need to extract the actual value of the connectionPool attributes. The fourth command sets the reapTime attribute on the ConnectionPool object