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

Performing operations on running objects using the wsadmin tool

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 perform operations on running objects:

Steps for this task

  1. Obtain the object name of the running object. For example:
    • Using Jacl:
      $AdminControl completeObjectName name
    • Using Jython:
      AdminControl.completeObjectName(name)
    where:
    $ is a Jacl operator for substituting a variable name with its value
    AdminControl is an object that enables the manipulation of MBeans running in a WebSphere Application Server process
    completeObjectName is an AdminControl command
    name is a fragment of the object name. It is used to find the matching object name. For example: type=Server,name=serv1,*. It can be any valid combination of domain and key properties. For example, type, name, cell, node, process, etc.
  2. Set the s1 variable to the running object, for example:
    • Using Jacl:
      set s1 [$AdminControl completeObjectName type=Server,name=server1,*]
    • Using Jython:
      s1 = AdminControl.completeObjectName('type=Server,name=server1,*')
    where:
    set is a Jacl command
    s1 is a variable name
    $ is a Jacl operator for substituting a variable name with its value
    AdminControl is an object that enables the manipulation of MBeans running in a WebSphere Application Server process
    completeObjectName is an AdminControl command
    type is the object name property key
    Server is the name of the object
    name is the object name property key
    server1 is the name of the server where the operation is invoked
  3. Invoke the operation. For example:
    • Using Jacl:
      $AdminControl invoke $s1 stop
    • Using Jython:
      AdminControl.invoke(s1, 'stop')
    where:
    $ is a Jacl operator for substituting a variable name with its value
    AdminControl is an object that enables the manipulation of MBeans running in a WebSphere Application Server process
    invoke is an AdminControl command
    s1 is the ID of the server that is specified in step number 3
    stop is an operation to invoke on the server

Example




Related concepts
AdminControl object for scripted administration

Related tasks
Modifying attributes on running objects with the wsadmin tool

Related reference
Commands for the AdminControl object

Task topic    

Terms of Use | Feedback

Last updated: Mar 17, 2005 4:28:29 AM CST
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_invokerunobj.html

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