Modify configuration objects using wsadmin.sh

 

Using Jacl


### Retrieve the configuration ID of the objects 
### that you want to modify...

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


### Show the current attribute values of the configuration object 

$AdminConfig show $jdbcProvider1


### Modify the attributes of the configuration object...

$AdminConfig modify $jdbcProvider1 {{description "A detailed description"}
                                    {name1 val1} 
                                    {name2 val2} 
                                    {name3 val3}}


$AdminConfig save

 

Using Jython


### Retrieve the configuration ID of the objects that you want to modify

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


### Show the current attribute values of the configuration object 

AdminConfig.show(jdbcProvider1)


### Modify the attributes of the configuration object, using Jython list

AdminConfig.modify(jdbcProvider1, [['description', "A detailed description"] \
                                   [name1, val1], \
                                   [name2, val2], \
                                   [name3, val3]])


### Modify the attributes of the configuration object, using Jython string

AdminConfig.modify(jdbcProvider1, '[[description "This is my new description"] \
                                    [name1 val1] \
                                    [name2 val2] \
                                    [name3 val3]]')


AdminConfig.save()