Removing configuration objects with the wsadmin tool
Overview
Use this task to delete a configuration object from the configuration repository. This action only affects the configuration. If there is a running instance of a configuration object when you remove the configuration, the change has no effect on the running instance.
- Invoke the AdminConfig object commands interactively, in a script, or use the wsadmin -c command from an operating system command prompt.
- Assign the ID string that identifies the server you want to remove:
Using Jacl:
set s1 [$AdminConfig getid /Node:mynode/Server:myserver/]Using Jython:
s1 = AdminConfig.getid('/Node:mynode/Server:myserver/')where:
set is a Jacl command s1 is a variable name $ is a Jacl operator for substituting a variable name with its value AdminConfig is an object representing the WebSphere Application Server configuration getid is an AdminConfig command Node is an object type mynode is the host name of the node from which the server is removed Server is an object type myserver is the name of the server to remove
- Issue the following command:
Using Jacl:
$AdminConfig remove $s1
Using Jython:
AdminConfig.remove(s1)where:
$ is a Jacl operator for substituting a variable name with its value AdminConfig is an object representing the WebSphere Application Server configuration remove is an AdminConfig command s1 evaluates the ID of the server specified in step number 2
- Save the configuration changes with the following command:
Using Jacl:
$AdminConfig save
Using Jython:
AdminConfig.save()Use the reset command of the AdminConfig object to undo changes that you made to your workspace since your last save.
Results
The WebSphere Application Server configuration no longer contains a specific server object. Running servers are not affected.
AdminConfig object for scripted administration