Specify running objects using the wsadmin tool

 

+

Search Tips   |   Advanced Search

 

Overview

Use the wsadmin tool to specify running objects.

 

Procedure

Obtain the configuration ID with one of the following ways:

If there are more than one running objects returned from the queryNames command, the objects are returned in a list syntax. One simple way to retrieve a single element from the list is to use the split command in Jython. The following example retrieves the first running object from the server list:

allServers = AdminControl.queryNames('type=Server,*')

# get line separator
import java
ls = java.lang.System.getProperty('line.separator')

aServer = allServers.split(ls)[0]

For example...

[wasuser@hostname wsadmin]$ wsadmin.sh -lang jython -f FirstElement.py
WASX7209I: Connected to process "dmgr" on node dmgr_node using SOAP connector; The type of process is: DeploymentManager
WebSphere:name=xyz_stage, process=xyz_stage, platform=proxy, node=foobar_node, j2eeType=J2EEServer, version=6.0.2.29, type=Server, mbeanIdentifier=cells/dmgr_cell/nodes/foobar_node/servers/xyz_stage/server.xml#Server_1218819941892, cell=dmgr_cell,processType=ManagedProcess

For other ways to manipulate the list and then perform pattern matching to look for a specified configuration object, refer to the Jacl syntax.

 

Results

You can now use the running object in with other AdminControl commands that require an object name as a parameter.



ObjectName, Attribute, and AttributeList classes

 

Related tasks

Use the AdminControl object for scripted administration

 

Related Reference

Commands for the AdminControl object