Example: Migrating - Listing configured server groups
The following examples demonstrate how to list configured server groups in the WAS V4.0 and V6.x:
- wscp V4.0You can put the result of this command into a Jacl list and invoke other operations, such as show, or modify, on the members of the list.ServerGroup list
- wsadmin V6.x$AdminConfig list ServerClusterAdminConfig.list('ServerCluster')
You can put the result of this command into a Jacl list and invoke other configuration commands, such as show, or modify, on the members of the list. To invoke operational commands, such as stop, perform the following:
- Obtain the configuration ID of the cluster:set myclust [$AdminConfig getid /ServerCluster:mycluster/]myclust = AdminConfig.getid('/ServerCluster:mycluster/')
- Use the returned name to obtain the ObjectName of the running cluster MBean:set runningCluster [$AdminConfig getObjectName $myclust]runningCluster = AdminConfig.getObjectName(myclust)
- The runningCluster has the object name for the running instance of the ServerCluster, or is empty if not running. Use this object name for control purposes, for example:$AdminControl invoke $runningCluster stopAdminControl.invoke(runningCluster, 'stop')
Commands for the AdminConfig object
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.