Modifying attributes on running objects with the wsadmin tool

Why and when to perform this task

Steps for this task

  1. Invoke the AdminControl object commands interactively, in a script, or use the wsadmin -c command from an operating system command prompt.
  2. Obtain the name of the running object with the following command:

    Using Jacl:

    $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 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.


  3. Issue the following command:

    Using Jacl:

    set ts1 [$AdminControl completeObjectName name]

    where:
    set is a Jacl command
    ts1 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 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.


  4. Modify the running object with the following command:

    Using Jacl:

    $AdminControl setAttribute $ts1 ringBufferSize 10

    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 server process
    setAttribute is an AdminControl command
    ts1 evaluates to the ID of the server specified in step number 3
    ringBufferSize is an attribute of modify objects
    10 is the value of the ringBufferSize attribute


    You can also modify multiple attribute name and value pairs, for example:

    Using Jacl:

    set ts1 [$AdminControl completeObjectName type=TraceService,process=server1,*]
    $AdminControl setAttributes $ts1 {{ringBufferSize 10} {traceSpecification com.ibm.*=all=disabled}}

    The new attribute values are returned to the command line.

Related reference
Example: Identifying running objects
Example: Turning traces on and off in a server process with the wsadmin tool



Searchable topic ID:   txml_queryrunobj
Last updated: Jun 21, 2007 4:55:42 PM CDT    WebSphere Application Server Network Deployment, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_queryrunobj.html

Library | Support | Terms of Use | Feedback