Modify attributes on running objects using wsadmin.sh

 

Using Jacl

### Obtain the name of the running object...

$AdminControl completeObjectName name

set ts1 [$AdminControl completeObjectName name]



### Modify the running object 

$AdminControl setAttribute $ts1 ringBufferSize 10

 

Using Jython

### Obtain the name of the running object...

AdminControl.completeObjectName(name)

ts1 = AdminControl.completeObjectName(name)


### Modify the running object 

AdminControl.setAttribute(ts1, 'ringBufferSize', 10)

 

Modify multiple attribute name and value pairs

Using Jacl

set ts1 [$AdminControl completeObjectName type=TraceService,process=server,*]

$AdminControl setAttributes $ts1 {{ringBufferSize 10} \
                                  {traceSpecification com.ibm.*=all=disabled}}

Using Jython list

ts1 = AdminControl.completeObjectName('type=TraceService,process=server,*')

AdminControl.setAttributes(ts1, [['ringBufferSize', 10], \
                                 ['traceSpecification', 'com.ibm.*=all=disabled']])

Using Jython string

ts1 =AdminControl.completeObjectName('type=TraceService,process=server,*')

AdminControl.setAttributes(ts1, '[[ringBufferSize 10] \
                                  [traceSpecification  com.ibm.*=all=disabled]]')