Removing configuration objects with the wsadmin tool
Use this task to delete a configuration object from the configuration repository. This action only affects the configuration. Before starting this task, the wsadmin tool must be running. See the Start the wsadmin scripting client article for more information.
Overview
If a running instance of a configuration object exists when you remove the configuration, the change has no effect on the running instance.
Procedure
- Assign the ID string that identifies the server to remove:
Use Jacl:
set s1 [$AdminConfig getid /Node:mynode/Server:myserver/]Using Jython:
s1 = AdminConfig.getid('/Node:mynode/Server:myserver/')where:
set Jacl command s1 variable name $ Jacl operator for substituting a variable name with its value AdminConfig object that represents the WebSphere Application Server configuration getid AdminConfig command Node object type mynode host name of the node from which the server is removed Server object type myserver name of the server to remove
- Remove the configuration object. For example:
Use Jacl:
$AdminConfig remove $s1
- Use Jython:
AdminConfig.remove(s1)where:
$ Jacl operator for substituting a variable name with its value AdminConfig object that represents the WebSphere Application Server configuration remove AdminConfig command s1 evaluates the ID of the server that is specified in step number 2
- Save the configuration changes. See the Saving configuration changes with the wsadmin tool article for more information.
- In a network deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more information.
Results
The WAS configuration no longer contains a specific server object. Running servers are not affected.
Use the AdminConfig object for scripted administration
Related Reference
Commands for the AdminConfig object