ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatz_5.4.0.1/51/admin/wsaobjadmctrl.htm

707 lines
29 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>The AdminControl object for scripted administration</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h5><a name="wsaobjadmctrl"></a>The AdminControl object for scripted administration</h5>
<p>Use the AdminControl object to invoke operational commands on objects that run in WebSphere Application Server - Express. Many of the AdminControl methods have multiple signatures. You can invoke these methods in a raw mode with parameters specified by Java Management Extensions (JMX), or with strings for parameters. It is recommended that you use string signatures. In addition to operational commands, the AdminControl object supports some utility methods for tracing, reconnecting with a server, and converting data types.</p>
<p>For additional information about the AdminControl object, see <a href="help/rxml_argument.html">Example: Collecting arguments for the AdminControl object</a>. <img src="help.gif" width="18" height="15" align="absbottom" alt="Go to Help documentation"></p>
<p><strong>completeObjectName</strong>
<br>Creates a string representation of a complete ObjectName value based based on a fragment. This method does not communicate with the server to find a matching ObjectName value. If it finds several MBeans that match the fragment, the method returns the first matching MBean.</p>
<p>Parameters: name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set serverON [$AdminControl completeObjectName node=mynode,type=Server,*]</pre></li>
<li>Jython:
<pre>serverON = AdminControl.completeObjectName('node=mynode,type=Server,*')</pre></li>
</ul>
<p><strong>getAttribute</strong>
<br>Returns the value of the attribute for the name you provide.</p>
<p>Parameters: name, attribute</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName WebSphere:type=Server,*]
$AdminControl getAttribute $objNameString processType</pre></li>
<li>Jython:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=Server,*')
AdminControl.getAttribute(objNameString, 'processType')</pre></li>
</ul>
<p><strong>getAttribute_jmx</strong>
<br>Returns the value of the attribute for the name you provide.</p>
<p>Parameters: name, attribute</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName WebSphere:type=Server,*]
set objName [java::new javax.management.ObjectName $objNameString]
$AdminControl getAttribute_jmx $objNameString processType</pre></li>
<li>Jython:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=Server,*')
import javax.management as mgmt
objName = mgmt.ObjectName(objNameString)
AdminControl.getAttribute_jmx(objName, 'processType')</pre></li>
</ul>
<p><strong>getAttributes</strong>
<br>Returns the attribute values for the names you provide.</p>
<p>Parameters: name, attributes</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName WebSphere:type=Server,*]
$AdminControl getAttributes $objName &quot;cellName nodeName&quot;</pre></li>
<li>Jython with string attributes:
<pre>objNameString = AdminControl.completeObjectname('WebSphere:type=Server,*)
AdminControl.getAttributes(objNameString, '[cellName nodeName]')</pre></li>
<li>Jython with object attributes:
<pre>objNameString = AdminControl.completeObjectname('WebSphere:type=Server,*)
AdminControl.getAttributes(objNameString, ['cellName', 'nodeName'])</pre></li>
</ul>
<p><strong>getAttributes_jmx</strong>
<br>Returns the attribute values for the names you provide.</p>
<p>Parameters: name, attributes</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objectNameString [$AdminControl completeObjectName WebSphere:type=Server,*]
set objName [java:;new javax.management.ObjectName $objectNamestring]
set attrs [java::new {String[]} 2 {cellName nodeName}]
$AdminControl getAttributes_jmx $objName $attrs</pre></li>
<li>Jython:
<pre>objectNameString = AdminControl.completeObjectName('type=Server,*')
objName = AdminControl.makeObjectName(objectNameString)
attrs = ['cellName', 'nodeName']
AdminControl.getAttributes_jmx(objName, attrs)</pre></li>
</ul>
<p><strong>getCell</strong>
<br>Returns the name of the connected cell.</p>
<p>Parameters: none</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl getCell</pre></li>
<li>Jython:
<pre>AdminControl.getCell()</pre></li>
</ul>
<p>Example output:</p>
<pre>Mycell</pre>
<p><strong>getConfigId</strong>
<br>Creates a configuration ID from an ObjectName or ObjectName fragment. Use this ID with the $AdminConfig method. Not all Mbeans that run have configuration objects that correspond. If there are several Mbeans that correspond to an ObjectName fragment, the command returns a warning message and creates a configuration ID for the first Mbean that it finds.</p>
<p>Parameters: name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set threadpoolCID [$AdminControl getConfigId node=mynode,type=ThreadPool,*]</pre></li>
<li>Jython:
<pre>threadpoolCID = AdminControl.getConfigId('node=mynode,type=ThreadPool,*')</pre></li>
</ul>
<p><strong>getDefaultDomain</strong>
<br>Returns the default domain name from the server.</p>
<p>Parameters: none</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl getDefaultDomain</pre></li>
<li>Jython:
<pre>AdminControl.getDefaultDomain()</pre></li>
</ul>
<p>Example output:</p>
<pre>WebSphere</pre>
<p><strong>getDomainName</strong>
<br>Returns the domain name from the server.</p>
<p>Parameters: none</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl getDomainName</pre></li>
<li>Jython:
<pre>AdminControl.getDomainName()</pre></li>
</ul>
<p>Example output:</p>
<pre>WebSphere</pre>
<p><strong>getHost</strong>
<br>Returns the name of your host.</p>
<p>Parameters: none</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl getHost</pre></li>
<li>Jython:
<pre>AdminControl.getHost()</pre></li>
</ul>
<p>Example output:</p>
<pre>myhost</pre>
<p><strong>getMBeanCount</strong>
<br>Returns the number of Mbeans registered in the server.</p>
<p>Parameters: none</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl getMBeanCount</pre></li>
<li>Jython:
<pre>AdminControl.getMBeanCount()</pre></li>
</ul>
<p>Example output:</p>
<pre>114</pre>
<p><strong>getMBeanInfo_jmx</strong>
<br>Returns the JMX MBeanInfo structure that corresponds to an OjbectName value. There is no string signature for this method, because the Help object displays most of the information available from getMBeanInfo.</p>
<p>Parameters: name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objName [java::new javax.management.ObjectName [$AdminControl
completeObjectName type=Server,*]]
$AdminControl getMBeanInfo_jmx $objName</pre></li>
<li>Jython:
<pre>objectNameString = AdminControl.completeObjectName('type=Server,*')
objName = AdminControl.makeObjectName(objectNameString)
AdminControl.getMBeanInfo_jmx(objName)</pre></li>
</ul>
<p>Example output:</p>
<pre>javax.management.modelmbean.ModelMBeanInfoSupport@10dd5f35</pre>
<p><strong>getNode</strong>
<br>Returns the name of the connected node.</p>
<p>Parameters: none</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl getNode</pre></li>
<li>Jython:
<pre>AdminControl.getNode()</pre></li>
</ul>
<p>Example output:</p>
<pre>myhost</pre>
<p><strong>getPort</strong>
<br>Returns the name of your port.</p>
<p>Parameters: none</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl getPort</pre></li>
<li>Jython:
<pre>AdminControl.getPort()</pre></li>
</ul>
<p>Example output:</p>
<pre>8877</pre>
<p><strong>getType</strong>
<br>Returns the connection type.</p>
<p>Parameters: none</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl getType</pre></li>
<li>Jython:
<pre>AdminControl.getType()</pre></li>
</ul>
<p>Example output:</p>
<pre>SOAP</pre>
<p><strong>help</strong>
<br>Returns general help text for the AdminControl object.</p>
<p>Parameters: none</p>
<p>Usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl help</pre></li>
<li>Jython:
<pre>AdminControl.help()</pre></li>
</ul>
<p>Output:</p>
<pre>WASX7027I: The AdminControl object enables the manipulation
of MBeans running in a WebSphere server process. The number and type
of MBeans available to the scripting client depends on the server to
which the client is connected. If the client is connected to a
Deployment Manager, then all the MBeans running in the Deployment
Manager are visible, as are all the MBeans running in the Node Agents
connected to this Deployment Manager, and all the MBeans running in
the application servers on those nodes.
The following commands are supported by AdminControl; more detailed
information about each of these commands is available by using the
&quot;help&quot; command of AdminControl and supplying the name of the command
as an argument.
Note that many of these commands support two different sets of
signatures: one that accepts and returns strings, and one low-level
set that works with JMX objects like ObjectName and AttributeList.
In most situations, the string signatures are likely to be more useful,
but JMX-object signature versions are supplied as well. Each of these
JMX-object signature commands has &quot;_jmx&quot; appended to the command name.
Hence there is an &quot;invoke&quot; command, as well as a &quot;invoke_jmx&quot; command.
completeObjectName
Return a String version of an object name given a
template name
getAttribute_jmx
Given ObjectName and name of attribute, returns value of
attribute
getAttribute Given String version of ObjectName and name of attribute,
returns value of attribute
getAttributes_jmx
Given ObjectName and array of attribute names, returns
AttributeList
getAttributes Given String version of ObjectName and attribute names,
returns String of name value pairs
getCell returns the cell name of the connected server
getConfigId Given String version of ObjectName, return a config id for
the corresponding configuration object, if any.
getDefaultDomain
returns &quot;WebSphere&quot;
getDomainName returns &quot;WebSphere&quot;
getHost returns String representation of connected host
getMBeanCount returns number of registered beans
getMBeanInfo_jmx
Given ObjectName, returns MBeanInfo structure for MBean
getNode returns the node name of the connected server
getPort returns String representation of port in use
getType returns String representation of connection type in use
help Show help information
invoke_jmx Given ObjectName, name of method, array of parameters and
signature, invoke method on MBean specified
invoke Invoke a method on the specified MBean
isRegistered_jmx
true if supplied ObjectName is registered
isRegistered true if supplied String version of ObjectName is registered
makeObjectName Return an ObjectName built with the given string
queryNames_jmx Given ObjectName and QueryExp, retrieves set of ObjectNames
that match.
queryNames Given String version of ObjectName, retrieves String of
ObjectNames that match.
reconnect reconnects with server
setAttribute_jmx
Given ObjectName and Attribute object, set attribute for MBean
specified
setAttribute Given String version of ObjectName, attribute name and
attribute value, set attribute for MBean specified
setAttributes_jmx
Given ObjectName and AttributeList object, set attributes for
the MBean specified
startServer Given the name of a server, start that server.
stopServer Given the name of a server, stop that server.
testConnection Test the connection to a DataSource object
trace Set the wsadmin trace specification
</pre>
<p><strong>help</strong>
<br>Returns help text for the specific method of the AdminControl object. The method name is not case sensitive.</p>
<p>Parameters: method</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl help getAttribute</pre></li>
<li>Jython:
<pre>AdminControl.help('getAttribute')</pre></li>
</ul>
<p>Example output:</p>
<pre>WASX7043I: Method: getAttribute; Arguments: object name, attribute Description:
Returns value of &quot;attribute&quot; for the MBean described by &quot;object name.&quot;</pre>
<p><strong>invoke</strong>
<br>Invokes the object operation without parameters. Returns the result of the invocation.</p>
<p>Parameters: name, operationName</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName WebSphere:type=Server,*]
$AdminControl invoke $objNameString stop</pre></li>
<li>Jython:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=Server,*')
AdminControl.invoke(objNameString, 'stop')</pre></li>
</ul>
<p><strong>invoke</strong>
<br>Invokes the object operation based on the parameter list that you supply. The signature generates automatically. The types of parameters are supplied by examining the MBeanInfo that the MBean supplies. Returns the string result of the invocation.</p>
<p>Parameters: name, operationName</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName WebSphere:type=Server,*]
$AdminControl invoke $objNameString appendTraceString com.ibm.*=all=enabled</pre></li>
<li>Jython:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=Server,*')
AdminControl.invoke(objNameString, 'appendTraceString', 'com.ibm.*=all=enabled')</pre></li>
</ul>
<p><strong>invoke</strong>
<br>Invokes the object operation by conforming the parameter list to the signature. Returns the result of the invocation.</p>
<p>Parameters: name, operationName, params, sigs</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName WebSphere:type=Server,*]
$AdminControl invoke $objNameString appendTraceString com.ibm.*=all=enabled
java.lang.String</pre></li>
<li>Jython:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=Server,*')
AdminControl.invoke(objNameString, 'appendTraceString', 'com.ibm.*=all=enabled',
'java.lang.String')</pre></li>
</ul>
<p><strong>invoke_jmx</strong>
<br>Invokes the object operation by conforming the parameter list to the signature. Returns the result of the invocation.</p>
<p>Parameters: name, operationName, params, sigs</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName WebSphere:type=TraceService,*]
set objName [java::new javax.management.ObjectName $objNameString]
set parms [java::new {java.lang.Object[]} 1 com.ibm.ejs.sm.*=all=disabled]
set signature [java::new {java.lang.String[]} 1 java.lang.String]
$AdminControl invoke_jmx $objName appendTraceString $parms $signature</pre></li>
<li>Jython:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=TraceService,*')
import javax.management as mgmt
objName = mgmt.ObjectName(objNameString)
parms = ['com.ibm.ejs.sm.*=all=disabled']
signature = ['java.lang.String']
AdminControl.invoke_jmx(objName, 'appendTraceString', parms, signature)</pre></li>
</ul>
<p><strong>isAlive</strong>
<br><p>Parameters: none</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl isAlive</pre></li>
<li>Jython:
<pre>AdminControl.isAlive()</pre></li>
</ul>
<p><strong>isInstanceof</strong>
<br>If the ObjectName value is a member of the class you provide, then the value is true.</p>
<p>Parameters: name, class name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName WebSphere:type=Server,*]
$AdminControl isInstanceOf $objNameString java.lang.Object</pre></li>
<li>Jython:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=Server,*')
AdminControl.isInstanceOf(objNameString, 'java.lang.Object')</pre></li>
</ul>
<p><strong>isInstanceof_jmx</strong>
<br>If the ObjectName value is a member of the class you provide, then the value is true.</p>
<p>Parameters: name, class name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objName [java::new javax.management.ObjectName
[$AdminControl completeObjectName WebSphere:type=Server,*]]
$AdminControl isInstanceOf_jmx $objName java.lang.Object</pre>
<li>Jython:
<pre>import javax.management as mgmt
objName = mgmt.ObjectName(AdminControl.completeObjectName('WebSphere:type=Server,*'))
AdminControl.isInstanceOf_jmx(objName, 'java.lang.Object')</pre></li>
</ul>
<p><strong>isRegistered</strong>
<br>If the ObjectName value is registered in the server, then the value is true.</p>
<p>Parameters: name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName WebSphere:type=Server,*]
$AdminControl isRegistered $objNameString</pre></li>
<li>Jython:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=Server,*')
AdminControl.isRegistered(objNameString)</pre></li>
</ul>
<p><strong>isRegistered_jmx</strong>
<br>If the ObjectName value is registered in the server, then the value is true.</p>
<p>Parameters: name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objName [java::new javax.management.ObjectName WebSphere:type=Server,*]
$AdminControl isRegistered_jmx $objName</pre></li>
<li>Jython:
<pre>objectNameString = AdminControl.completeObjectName('type=Server,*')
objName = AdminControl.makeObjectName(objectNameString)
AdminControl.isRegistered_jmx(objName)</pre></li>
</ul>
<p><strong>makeObjectName</strong>
<br>Creates an ObjectName value based on the strings that you specify. This method does not communicate with the server, and may generate an ObjectName value that does not exist. If the string you supply contains an extra set of quotation marks (&quot;), they are removed. If the string does not begin with a Java Management eXtensions (JMX) domain, or a string followed by a colon, then the WebSphere string prepends to the name.</p>
<p>Parameters: name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objName [$AdminControl makeObjectName WebSphere:type=Server,node=mynode,*]</pre></li>
<li>Jython:
<pre>objectNameString = AdminControl.completeObjectName('type=Server,node=mynode,*')
objName = AdminControl.makeObjectName(objectNameString)</pre></li>
</ul>
<p><strong>queryNames</strong>
<br>Returns a string that lists all ObjectNames based on the name template.</p>
<p>Parameters: name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl queryNames WebSphere:type=Server,*</pre></li>
<li>Jython:
<pre>AdminControl.queryNames('WebSphere:type=Server,*')</pre></li>
</ul>
<p>Example output:</p>
<pre>WebSphere:cell=BaseApplicationServerCell,name=server1,mbeanIdentifier=server1,
type=Server,node=mynode,process=server1</pre>
<p><strong>queryNames_jmx</strong>
<br>Returns a set of ObjectName objects, based on the ObjectName and QueryExp that you provide.</p>
<p>Parameters: name, query</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objName [java::new javax.management.ObjectName WebSphere:type=Server,*]
set null [java::null]
$AdminControl queryNames_jmx $objName $null</pre></li>
<li>Jython:
<pre>objectNameString = AdminControl.completeObjectName('type=Server,*')
objName = AdminControl.makeObjectName(objectNameString)
AdminControl.queryNames_jmx(objName, None)</pre></li>
</ul>
<p>Example output:</p>
<pre>[WebSphere:cell=BaseApplicationServerCell,name=server1,mbeanIdentifier=server1,
type=Server,node=mynode,process=server1]</pre>
<p><strong>reconnect</strong>
<br>Reconnects to the server, and clears information out of the local cache.</p>
<p>Parameters: none</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl reconnect</pre></li>
<li>Jython:
<pre>AdminControl.reconnect()</pre></li>
</ul>
<p>Example output:</p>
<pre>WASX7074I: Reconnect of SOAP connector to host myhost completed.</pre>
<p><strong>setAttribute</strong>
<br>Sets the attribute value for the name you provide.</p>
<p>Parameters: name, attributeName, attributeValue</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName
WebSphere:type=TraceService,*]
$AdminControl setAttribute $objNameString traceSpecification
com.ibm.*=all=disabled</pre></li>
<li>Jython:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=TraceService,*')
AdminControl.setAttribute(objNameString, 'traceSpecification',
'com.ibm.*=all=disabled')</pre></li>
</ul>
<p><strong>setAttribute_jmx</strong>
<br>Sets the attribute value for the name you provide.</p>
<p>Parameters: name, attribute</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objectNameString [$AdminControl completeObjectName
WebSphere:type=TraceService,*]
set objName [java:;new javax.management.ObjectName $objectNamestring]
set attr [java::new javax.management.Attribute
traceSpecification com.ibm.*=all=disabled]
$AdminControl setAttribute_jmx $objName $attr</pre></li>
<li>Jython:
<pre>objectNameString = AdminControl.completeObjectName('WebSphere:type=TraceService,*')
import javax.management as mgmt
objName = AdminControl.makeObjectName(objectNameString)
attr = mgmt.Attribute('traceSpecification', 'com.ibm.*=all=disabled')
AdminControl.setAttribute_jmx(objName, attr)</pre></li>
</ul>
<p><strong>setAttributes</strong>
<br>Sets the attribute values for the names you provide and returns a list of successfully set names.</p>
<p>Parameters: name, attributes</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objNameString [$AdminControl completeObjectName
WebSphere:type=TracesService,*]
$AdminControl setAttributes $objNameString {{traceSpecification
com.ibm.ws.*=all=enabled}}</pre></li>
<li>Jython with string attributes:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=TracesService,*')
AdminControl.setAttributes(objNameString, '[[traceSpecification &quot;com.ibm.ws.*=all=enabled&quot;]]')</pre></li>
<li>Jython with object attributes:
<pre>objNameString = AdminControl.completeObjectName('WebSphere:type=TracesService,*')
AdminControl.setAttributes(objNameString, [['traceSpecification', 'com.ibm.ws.*=all=enabled']])</pre></li>
</ul>
<p><strong>setAttributes_jmx</strong>
<br>Sets the attribute values for the names you provide and returns a list of successfully set names.</p>
<p>Parameters: name, attributes</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set objectNameString [$AdminControl completeObjectName
WebSphere:type=TraceService,*]
set objName [java:;new javax.management.ObjectName $objectNamestring]
set attr [java::new javax.management.Attribute traceSpecification
com.ibm.ws.*=all=enabled]
set alist [java::new javax.management.AttributeList]
$alist add $attr
$AdminControl setAttributes_jmx $objName $alist</pre></li>
<li>Jython:
<pre>objectNameString = AdminControl.completeObjectName('WebSphere:type=TraceService,*')
import javax.management as mgmt
objName = AdminControl.makeObjectName(objectNameString)
attr = mgmt.Attribute('traceSpecification', 'com.ibm.ws.*=all=enabled')
alist = mgmt.AttributeList()
alist.add(attr)
AdminControl.setAttributes_jmx(objName, alist)</pre></li>
</ul>
<p><strong>startServer</strong>
<br>Starts the specified application server. This command uses the default wait time. You can only use this command if the scripting client is connected to a NodeAgent. It returns a message to indicate if the server starts successfully.</p>
<p>Parameters: server name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl startServer server1</pre></li>
<li>Jython:
<pre>AdminControl.startServer('server1')</pre></li>
</ul>
<p><strong>startServer</strong>
<br>Starts the specified application server. The start process waits the number of seconds specified by the wait time for the server to start. You can only use this command if the scripting client is connected to a NodeAgent. It returns a message to indicate if the server starts successfully.</p>
<p>Parameters: server name, wait time</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl startServer server1 100</pre></li>
<li>Jython:
<pre>AdminControl.startServer('server1', 100)</pre></li>
</ul>
<p><strong>startServer</strong>
<br>Starts the specified application server. This command uses the default wait time. You can use this command when the scripting client is either connected to a NodeAgent or Deployment Manager process. It returns a message to indicate if the server starts successfully.</p>
<p>Parameters: server name, node name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl startServer server1 myNode</pre></li>
<li>Jython:
<pre>AdminControl.startServer('server1', 'myNode')</pre></li>
</ul>
<p><strong>startServer</strong>
<br>Starts the specified application server. The start process waits the number of seconds specified by the wait time for the server to start. You can use this command when the scripting client is either connected to a NodeAgent or Deployment Manager process. It returns a message to indicate if the server starts successfully.</p>
<p>Parameters: server name, node name, wait time</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl startServer server1 myNode 100</pre></li>
<li>Jython:
<pre>AdminControl.startServer('server1', 'myNode', 100)</pre></li>
</ul>
<p><strong>stopServer</strong>
<br>Stops the specified application server. The command returns a message to indicate if the server stops successfully.</p>
<p>Parameters: server name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl stopServer server1</pre></li>
<li>Jython:
<pre>AdminControl.stopServer('server1')</pre></li>
</ul>
<p><strong>stopServer</strong>
<br>Stops the specified application server. If you set the flag to immediate, the server stops immediately. The command returns a message to indicate if the server stops successfully.</p>
<p>Parameters: server name, immediate flag</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl stopServer server1 immediate</pre></li>
<li>Jython:
<pre>AdminControl.stopServer('server1', 'immediate')</pre></li>
</ul>
<p><strong>stopServer</strong>
<br>Stops the specified application server. The command returns a message to indicate if the server stops successfully.</p>
<p>Parameters: server name, node name</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl stopServer server1 myNode</pre></li>
<li>Jython:
<pre>AdminControl.stopServer('server1', 'my Node')</pre></li>
</ul>
<p><strong>stopServer</strong>
<br>Stops the specified application server. If you set the flag to immediate, the server stops immediately. The command returns a message to indicate if the server stops successfully.</p>
<p>Parameters: server name, node name, immediate flag</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl stopServer server1 myNode immediate</pre></li>
<li>Jython:
<pre>AdminControl.stopServer('server1', 'my Node', 'immediate')</pre></li>
</ul>
<p><strong>testConnection</strong>
<br>Communicates with the DataSourceCfgHelper Mbean to test a DataSource connection. This command works with DataSource resided in the configuration repository. If the DataSource to be tested is in the temporary workspace that holds the update to the repository, you must save the update to the configuration repository before you run this command. Use this method with the configuration ID that corresponds to the DataSource and the WAS40DataSource object types. The return value is a message that indicates a successful connection or a connection with warning. If the connection fails, an exception is thrown from the server.</p>
<p>Parameters: configId</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>set ds [lindex [$AdminConfig list DataSource] 0]
$AdminControl testConnection $ds</pre></li>
<li>Jython:
<pre># get line separator
import java.lang.System as sys
lineSeparator = sys.getProperty('line.separator')
ds = AdminConfig.list('DataSource').split(lineSeparator)[0]
AdminControl.testConnection(ds)</pre></li>
</ul>
<p>Example output:</p>
<pre>WASX7217I: Connection to provided datasource was successful.</pre>
<p><strong>trace</strong>
<br>Sets the trace specification for the scripting process to the value that you specify.</p>
<p>Parameters: traceSpec</p>
<p>Example usage:</p>
<ul>
<li>Jacl:
<pre>$AdminControl trace com.ibm.ws.scripting.*=all=enabled</pre></li>
<li>Jython:
<pre>AdminControl.trace('com.ibm.ws.scripting.*=all=enabled')</pre></li>
</ul>
</body>
</html>