Welcome to Jython exclusive blog developed for the WebSphere Admins only. Here in this post we can explore more about the real-time wsadmin Objects. Which are most critical to develop the automate WebSphere server side.
wsadmin>print AdminConfig.help()
wsadmin>print AdminConfig.getid('/Node:DmgrNode05')
WASX7053I: The AdminConfig object communicates with the Config Service in a WebSphere server to manipulate configuration data for a WebSphere installation. AdminConfig has commands to list, create, remove, display, and modify configuration data, as well as commands to display information about configuration data types. Most of the commands supported by AdminConfig operate in two modes: the default mode is one in which AdminConfig communicates with the WebSphere server to accomplish its tasks. A local mode is also possible, in which no server communication takes place. The local mode of operation is invoked by bringing up the scripting client with no server connected using the command line "-conntype NONE" option or setting the "com.ibm.ws.scripting.connectionType=NONE" property in the wsadmin.properties. The following commands are supported by AdminConfig; more detailed information about each of these commands is available by using the "help" command of AdminConfig and supplying the name of the command as an argument. attributes Shows the attributes for a given type checkin Checks a file into the the configuration repository convertToCluster Converts a server to be the first member of a new ServerCluster create Creates a configuration object, given a type, a parent, and a list of attributes, and optionally an attribute name for the new object createClusterMember Creates a new server that is a member of an existing cluster createDocument Creates a new document in the configuration repository createUsingTemplate Creates an object using a particular template type defaults Displays the default values for attributes of a given type deleteDocument Deletes a document from the configuration repository existsDocument Tests for the existence of a document in the configuration repository extract Extracts a file from the configuration repository getCrossDocumentValidationEnabled Returns true if cross-document validation is enabled getid Shows the configuration ID of an object, given a string version of its containment getObjectName Given a configuration ID, returns a string version of the ObjectName for the corresponding running MBean, if any getObjectType Given a configuration ID, returns a string version of the object type getSaveMode Returns the mode used when "save" is invoked getValidationLevel Returns the validation used when files are extracted from the repository. getValidationSeverityResult Returns the number of messages of a given severity from the most recent validation hasChanges Returns true if unsaved configuration changes exist help Shows help information installResourceAdapter Installs a J2C resource adapter with the given rar file name and an option string in the node list Lists all configuration objects of a given type listTemplates Lists all available configuration templates of a given type modify Changes specified attributes of a given configuration object parents Shows the objects which contain a given type queryChanges Returns a list of unsaved files remove Removes the specified configuration object required Displays the required attributes of a given type. reset Discards unsaved configuration changes resetAttributes Resets value of the specified attributes. save Commits unsaved changes to the configuration repository setCrossDocumentValidationEnabled Sets the cross-document validation enabled mode. setSaveMode Changes the mode used when "save" is invoked setValidationLevel Sets the validation used when files are extracted from the repository. show Shows the attributes of a given configuration object showall Recursively shows the attributes of a given configuration object, and all the objects contained within each attribute. showAttribute Displays only the value for the single attribute specified. types Shows the possible types for configuration uninstallResourceAdapter Uninstalls a J2C resource adapter with the given resource adapter configuration ID. unsetAttributes Unsets value of the specified attributes. validate Invokes validationwsadmin>print AdminConfig.getid
wsadmin>print AdminConfig.getid() WASX7015E: Exception running command: "AdminConfig.getid()"; exception information: com.ibm.ws.scripting.ScriptingException: WASX7352E: Wrong number of arguments for "getid" command. Help information follows: WASX7085I: Method: getid Arguments: containment path Description: Returns the configuration ID for an object described by the given containment path -- for example, /Node:myNode/Server:s1/JDBCProvider:jdbc1/ wsadmin>print AdminConfig.getid('/Node:Dmgr05') wsadmin>print AdminConfig.getid('/Node:DmgrNode05' Traceback (innermost last): (no code object) at line 0 File "", line 1 SyntaxError: invalid syntax
wsadmin>print AdminConfig.getid('/Node:DmgrNode05')
DmgrNode05(cells/DmgrCell05/nodes/DmgrNode05|node.xml#Node_1)
wsadmin>print AdminControl.help()
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
"help" 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 "_jmx" appended to the command name.
Hence there is an "invoke" command, as well as a "invoke_jmx" command.
completeObjectName
Returns 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. Given String version
of ObjectName, returns String of all name value pairs.
getCell Returns the cell name of the connected server
getConfigId Given String version of ObjectName, return a configuration
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
getObjectInstance
Given String version of ObjectName, returns ObjectInstance
object that match.
getPort Returns String representation of port in use
getType Returns String representation of connection type in use
help Shows help information
invoke_jmx Given ObjectName, name of method, array of parameters and
signature, invokes method on MBean specified
invoke Invokes a method on the specified MBean
isRegistered_jmx
Returns true if supplied ObjectName is registered
isRegistered Returns true if supplied String version of ObjectName is
registered
makeObjectName Returns 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
queryMBeans Given String version of ObjectName, returns a set of
ObjectInstances object that match
reconnect Reconnects with server
setAttribute_jmx
Given ObjectName and Attribute object, sets attribute for MBean
specified
setAttribute Given String version of ObjectName, attribute name and
attribute value, sets attribute for MBean specified
setAttributes_jmx
Given ObjectName and AttributeList object, sets attributes for
the MBean specified
setAttributes Given String version of ObjectName, attribute name
and value pairs, sets attributes for the MBean specified
startServer Given the name of a server, starts that server
stopServer Given the name of a server, stops that server
testConnection Tests the connection to a DataSource object
trace Sets the wsadmin trace specification
wsadmin>print AdminApp.help()
WASX7095I: The AdminApp object allows application objects to be manipulated
-- this includes installing, uninstalling, editing, and listing. Most
of the commands supported by AdminApp operate in two modes: the default
mode is one in which AdminApp communicates with the WebSphere server to
accomplish its tasks. A local mode is also possible, in which no
server communication takes place. The local mode operation is invoked
by bringing up the scripting client with no server connected using the
command line "-conntype NONE" option tor setting the
"com.ibm.ws.scripting.connectionType=NONE" property in the
wsadmin.properties.
The following commands are supported by AdminApp; more detailed
information about each of these commands is available by using the
"help" command of AdminApp and supplying the name of the command
as an argument.
deleteUserAndGroupEntries
Deletes all the user/group information for all the roles and
all the user name/password information for RunAs roles for a
given application
edit Edits the properties of an application
editInteractive Edits the properties of an application interactively
export Exports application to a file
exportDDL Exports DDL from application to a directory
exportFile Exports content of a single file from an application to a file
getDeployStatus Returns the combined Deployment status of the application
help Shows help information
install Installs an application, given a file name and an option string
installInteractive
Installs an application in interactive mode, given a file name
and an option string
isAppReady Checks whether the application is ready to be run
list Lists all installed applications
listModules Lists the modules in a specified application
options Shows the options available, for a given file, application,
or in general
renameApplication Rename a given application
publishWSDL Publishs WSDL files for a given application
searchJNDIReferences
Lists application that refers to the given JNDIName on a given
node
taskInfo Shows detailed information pertaining to a given install task
for a given file
uninstall Uninstalls an application, given an application name and
an option string
update Updates an installed application
updateAccessIDs Updates the user/group binding information with accessID
from user registry for a given application
updateInteractive Updates an installed application interactively
view Views an application or module, given an application or
module name
wsadmin>print AdminTask.help()
WASX8001I: The AdminTask object enables the execution of available admin commands. AdminTask commands operate in two modes: the default mode is one which AdminTask communicates with the WebSphere server to accomplish its task. A local mode is also available, in which no server communication takes place. The local mode of operation is invoked by bringing up the scripting client using the command line "-conntype NONE" option or setting the "com.ibm.ws.scripting.connectiontype=NONE" property in wsadmin.properties file. The number of admin commands varies and depends on your WebSphere install. Use the following help commands to obtain a list of supported commands and their parameters: help -commands Lists all the admin commands help -commandsLists admin commands matching with wildcard "pattern" help -commandGroups Lists all the admin command groups help -commandGroups Lists admin command groups matching with wildcard "pattern" help commandName Displays detailed information for the specified command help commandName stepName Displays detailed information for the specified step belonging to the specified command help commandGroupName Displays detailed information for the specified command group There are various flavors to invoke an admin command. They are commandName Invokes an admin command that does not require any argument. commandName targetObject Invokes an admin command with the specified target object string, for example, the configuration object name of a resource adapter. The expected target object varies with the admin command invoked. Use help command to get information on the target object of an admin command. commandName options Invokes an admin command with the specified option strings. This invocation syntax is used to invoke an admin command that does not require a target object. It is also used to enter interactive mode if "-interactive" mode is included in the options string. commandName targetObject options Invokes an admin command with the specified target object and options strings. If "-interactive" is included in the options string, then interactive mode is entered. The target object and options strings vary depending on the admin command invoked. Use help command to get information on the target object and options.
No comments:
Post a Comment