Disable a component using wsadmin
Using Jacl:
set server [$AdminConfig getid /Cell:cell/Node:node/Server:server/] set components [$AdminConfig list Component $server] ### Since the name server component is the third element in the list, retrieve this ### element by using index 2. set nameServer [lindex $components 2] $AdminConfig modify $nameServer {{stateManagement {{initialState STOP}}}} $AdminConfig save
Using Jython
server = AdminConfig.getid('/Cell:cell/Node:node/Server:server/') print server components = AdminConfig.list('Component', server) print components ### Get line separator import java lineSeparator = java.lang.System.getProperty('line.separator') arrayComponents = components.split(lineSeparator) nameServer = arrayComponents[2] print nameServer AdminConfig.modify(nameServer, [['stateManagement', [['initialState', 'STOP']]]]) AdminConfig.save()