Use the AdminControl object for scripted administration
Overview
The AdminControl scripting object is used for operational control. It communicates with MBeans that represent live objects running a WebSphere server process.
It includes commands to query existing running objects and their attributes and invoke operation on the running objects. In addition to the operational commands, the AdminControl object supports commands to...
- query information on the connected server
- client tracing
- reconnecting to a server
- start and stop servers for network deployment environments
Many of the operational commands have two sets of signatures so that they can either invoke using string based parameters or using JMX objects as parameters. Depending on the server process to which a scripting client is connected, the number and type of MBeans available varies. When connected to an appserver, only MBeans running in that appserver are visible.
If a scripting client is connected to a deployment manager, then all MBeans in all server processes are visible. If a scripting client is connected to a node agent, all MBeans in all server processes on that node are accessible.
The following steps provide a general method to manage the cycle of an application:
- Install the application.
- Edit the application.
- Update the application.
- Uninstall the application.
To see a list of all available commands for the AdminControl object see...
Commands for the AdminControl objectYou can also use the Help command...
print AdminControl.help()
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 "WebSphere" getDomainName returns "WebSphere" 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 setAttributes Given String version of ObjectName, attribute name and value pairs, 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
ObjectName, Attribute, and AttributeList classes
Example: Collecting arguments for the AdminControl object
Example: Identifying running objects
Specifying running objects using the wsadmin tool
Identifying attributes and operations for running objects with the wsadmin tool
Performing operations on running objects using the wsadmin tool
Modifying attributes on running objects with the wsadmin tool
Synchronizing nodes with the wsadmin tool
Related Reference
Commands for the AdminControl object