Use scripting and the wsadmin tool to specify running objects.
About this task
Perform the following steps 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 lindex command in Jacl and split command
in Jython. The following example retrieves the first running object
from the server list:
Using Jacl:
set allServers [$AdminControl queryNames type=Server,*]
set aServer [lindex $allServers 0]
Using Jython:
allServers = AdminControl.queryNames('type=Server,*')
# get line separator
import java
lineSeparator = java.lang.System.getProperty('line.separator')
aServer = allServers.split(lineSeparator)[0]
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.