Perform the following steps to invoke an administrative command in batch mode. To invoke an administrative command in interactive mode, see Invoking an administrative command in interactive mode.
$AdminTask commandNameUsing Jython:
AdminTask.commandName()where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminTask | is an object allowing administrative command management |
commandName | is the name of the administrative command being invoked |
$AdminTask commandName targetObjectUsing Jython:
AdminTask.commandName(targetObject)where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminTask | is an object allowing administrative command management |
commandName | is the name of the administrative command being invoked |
targetObject | is the target object string for the invoked administrative command. The expect target object varies with each administrative command. View the online help for the invoked administrative command to learn more about what you should specify as the target object. |
$AdminTask commandName optionsUsing Jython:
AdminTask.commandName(options)where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminTask | is an object allowing administrative command management |
commandName | is the name of the administrative command being invoked |
options | is the option string for the invoked administrative command. Depending on which administrative command you are invoking, the administrative command can have required or optional option values. The options string is different for each administrative command. View the online help for the invoked administrative command to obtain more information about which options are available. Arguments and steps listed on the online administrative command help are specified as options in the option string. Each option consists of a dash followed immediately by an option name, and then followed by an option value if the option requires a value. If the invoked administrative command includes target objects, arguments, or steps, then the -interactive option is available to enter interactive mode. For example, using the output of the following online help for listDataSource:WASX8006I: Detailed help for command: exportServer Description: export the configuration of a server to a config archive. Target object: None Arguments: *serverName - the name of a server *nodeName - the name of a node. This parameter becomes optional if the specified server name is unique across the cell. *archive - the fully qualified file path of a config archive. Steps: None Option names are specified with a dash before the names. There are three required options for this administrative command. The required options are -serverName, -nodename, and -archive. In addition, the -interactive option is available. Options are specified in the option string which is enclosed by a pair of {} in Jacl and a pair of [] in Jython. |
$AdminTask commandName targetObject optionsUsing Jython:
AdminTask.commandName(targetObject, options)where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminTask | is an object allowing administrative command management |
commandName | is the name of the administrative command being invoked |
targetObject | is the target object string for the invoked administrative command. The expected target object varies with each administrative command.
View the online help for the invoked administrative command to obtain information about what to specify as a target object. For example, using the output of the following online help for createJ2CConnectionFactory:WASX8006I: Detailed help for command: createJ2CConnectionFactory Description: Create a J2C connection factory *Target object: The parent J2C resource adapter of the created J2C connection factory. Arguments: *connectionFactoryInterface - A connection factory interface that is defined in the deployment description of the parent J2C resource adapter. *name - The name of the J2C connection factory. *jndiName - The JNDI name of the created J2C connection factory. description - The description for the created J2C connection factory. authDataAlias - the authentication data alias of the created J2C connection factory. Steps: NoneThe target object is a configuration object name of a J2CResourceAdapter. |
options | is the option string for the invoked administrative command. Depending on which administrative command you are invoking, the administrative command can have required or optional option values. The options string is different for each administrative command. View the online help for the invoked administrative command to obtain more information about which options are available. Arguments and steps listed on the online administrative command help are specified as options in the option string. Each option consists of a dash followed immediately by an option name, and then followed by an option value if the option requires a value. If the invoked administrative command includes target objects, arguments, or steps, then the -interactive option is available to enter interactive mode. For example, using the output of the following online help for listDataSource:WASX8006I: Detailed help for command: createJ2CConnectionFactory Description: Create a J2C connection factory *Target object: The parent J2C resource adapter of the created J2C connection factory. Arguments: *connectionFactoryInterface - A connection factory interface that is defined in the deployment description of the parent J2C resource adapter. *name - The name of the J2C connection factory. *jndiName - The JNDI name of the created J2C connection factory. description - The description for the created J2C connection factory. authDataAlias - the authentication data alias of the created J2C connection factory. Steps: NoneOption names are specified with a dash before the names. There are three required options for this administrative command. The required options are -connectionFactoryInterface, -name, and -jndiName. There are two optional options. They are -description and -authDataAlias. In addition, the -interactive option is available. Options are specified in the option string which is enclosed by a pair of {} in Jacl and a pair of [] in Jython. |
Example
$AdminTask listNodesUsing Jython:
print AdminTask.listNodes()
Example output:
myNode
set s1 [$AdminConfig getid /Server:server1/] $AdminTask showServerInfo $s1Using Jython:
s1 = AdminConfig.getid('/Server:server1/') print AdminTask.showServerInfo(s1)Example output:
{cell myCell} {serverType APPLICATION_SERVER} {com.ibm.websphere.baseProductVersion 6.0.0.0} {node myNode} {server server1}
$AdminTask getNodeMajorVersion {-nodeName myNode}Using Jython:
print AdminTask.getNodeMajorVersion('[-nodeName myNode]')Example output:
6
set ra [$AdminConfig getid /J2CResourceAdapter:myResourceAdapter/] $AdminTask createJ2CConnectionFactory $ra {-name myJ2CCF -jndiName j2c/cf -connectionFactoryInterface javax.resource.cci.ConnectionFactory}Using Jython:
ra = AdminConfig.getid('/J2CResourceAdapter:myResourceAdapter/') AdminTask.createJ2CConnectionFactory(ra, '[-name myJ2CCF -jndiName j2c/cf -connectionFactoryInterface javax.resource.cci.ConnectionFactory]')Example output:
myJ2CCF(cells/myCell/nodes/myNode|resources.xml#J2CConnectionFactory_1069690568269)
set serverCluster [$AdminConfig getid /ServerCluster:myCluster/] $AdminTask createClusterMember $serverCluster {-memberConfig {{myNode myClusterMember "" "" false false}}}Using Jython:
serverCluster = AdminConfig.getid('/ServerCluster:myCluster/') AdminTask.createClusterMember(serverCluster, '[-memberConfig [[myNode myClusterMember "" "" false false]]]')Example output:
myClusterMember(cells/myCell/nodes/myNode|cluster.xml#ClusterMember_3673839301876)