Use the wsadmin tool to start application server, generic server,
and proxy server clusters in the application server runtime.
Before you begin
There are multiple ways to complete this task. This topic uses
the AdminControl object to start clusters in your environment. Alternatively,
you can use the ClusterConfigCommands command group for the AdminTask object
or the startSingleCluster, stopSingleCluster, rippleStartAllClusters, and
rippleStartSingleCluster scripts in the AdminClusterManagement script library
to administer clusters.
Procedure
- Start the wsadmin scripting tool.
- Identify the ClusterMgr MBean and assign it to the clusterMgr variable.
Using Jacl:
set clusterMgr [$AdminControl completeObjectName cell=mycell,type=ClusterMgr,*]
Using Jython:
clusterMgr = AdminControl.completeObjectName('cell=mycell,type=ClusterMgr,*')
print clusterMgr
This command returns the ClusterMgr MBean.
Example output:
WebSphere:cell=mycell,name=ClusterMgr,mbeanIdentifier=ClusterMgr,
type=ClusterMgr,process=dmgr
- Refresh the list of clusters.
Using Jacl:
$AdminControl invoke $clusterMgr retrieveClusters
Using Jython:
AdminControl.invoke(clusterMgr, 'retrieveClusters')
This command calls the retrieveClusters operation on the ClusterMgr MBean.
- Identify the Cluster MBean and assign it to the cluster variable.
Using Jacl:
set cluster [$AdminControl completeObjectName cell=mycell,type=Cluster,name=cluster1,*]
Using Jython:
cluster = AdminControl.completeObjectName('cell=mycell,type=Cluster,name=cluster1,*')
print cluster
This command returns the Cluster MBean.
Example output:
WebSphere:cell=mycell,name=cluster1,mbeanIdentifier=Cluster,type=Cluster,process=cluster1
- Start or RippleStart the cluster.
- To start a cluster, use the following example. These commands invoke the
start operation on the cluster MBean:
-
Using Jacl:
$AdminControl invoke $cluster start
Using Jython:
AdminControl.invoke(cluster, 'start')
- Use the following example to RippleStart a cluster. RippleStart combines
stopping and starting operations. It first stops and then restarts each member
of the cluster. For example, your cluster contains 3 cluster members named
server_1, server_2 and server_3. When you click RippleStart, server_1 stops
and restarts, then server_2 stops and restarts, and finally server_3 stops
and restarts. Use the RippleStart option instead of manually stopping and
then starting all of the application servers in the cluster. The following
commands invoke the rippleStart operation on the cluster MBean:
-
Using Jacl:
$AdminControl invoke $cluster rippleStart
Using Jython:
AdminControl.invoke(cluster, 'rippleStart')