Remove configuration objects with wsadmin.sh
Use this task to delete a configuration object from the configuration repository. This action only affects the configuration.
If a running instance of a configuration object exists when you remove the configuration, the change has no effect on the running instance.
- Start the wsadmin scripting tool.
- Assign the ID string identifying server to remove:
Jacl:
set s1 [$AdminConfig getid /Node:mynode/Server:myserver/]
Using Jython:
s1 = AdminConfig.getid('/Node:mynode/Server:myserver/')
Element Description 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 that represents the WAS 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
- Remove the configuration object. For example:
Jacl:
$AdminConfig remove $s1
Jython:
AdminConfig.remove(s1)
Element Description $ is a Jacl operator for substituting a variable name with its value AdminConfig is an object that represents the WAS configuration remove is an AdminConfig command s1 evaluates the ID of the server specified in step number 2
- Save the configuration changes.
Use the following command example to save the configuration changes:
AdminConfig.save()
- In a network deployment environment only, synchronize the node.
Use the syncActiveNode or syncNode scripts in the AdminNodeManagement script library to propagate the configuration changes to node or nodes.
- Use the syncActiveNodes script to propagate the changes to each node in the cell:
AdminNodeManagement.syncActiveNodes()
- Use the syncNode script to propagate the changes to a specific node:
AdminNodeManagement.syncNode("myNode")
Results
The application server configuration no longer contains a specific server object. Running servers are not affected.
Related tasks
Synchronize nodes using wsdmin.sh Use the script library to automate the application serving environment Use the wsadmin scripting AdminConfig object for scripted administration
Commands for the AdminConfig object