WebSphere Application Server Network Deployment, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Starting clusters using scripting

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

Why and when to perform this task

Perform the following steps to start a cluster:

Steps for this task

  1. 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
  2. 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.
  3. 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
  4. 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')



Related concepts
AdminControl object for scripted administration

Related tasks
Stopping clusters using scripting

Related reference
Commands for the AdminControl object

Task topic    

Terms of Use | Feedback

Last updated: Dec 11, 2005 4:07:15 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_startcluster.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)