Obtaining online help using scripting
Overview
Three levels of online help are available with the administrative commands. The top-level help provides general information for the AdminTask object and associated commands. The second-level help provides information about all of the available administrative commands and command groups. The third-level help provides specific help on a command group, a command, or a step. Command group-specific help provides descriptions for the command group that you specify and the commands that belong to the associated group. Command-specific help provides description for the specified command, and associated parameters and steps. Step-specific help provides a description for the specified step and the associated parameters. For command and step-specific help, required parameters are marked with an asterisk (*) in the help output.
- To obtain general help, use the code in the following examples:
$AdminTask helpprint AdminTask.help()Example output
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 list all the admin commands help -commandGroups list all the admin command groups help commandName display detailed information for the specified command help commandName stepName display detailed information for the specified step belonging to the specified command help commandGroupName display detailed information for the specified command group There are various flavors to invoke an admin command: 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.- To list the available command groups, use the code in the following examples:
$AdminTask help -commandGroupsprint AdminTask.help(‘-commandGroups’)Example output
WASX8005I: Available admin command groups: ClusterConfigCommands - Commands for configuring application server clusters and cluster members. JCAManagement - A group of admin commands that helps to configure Java2 Connector Architecture(J2C) related resources.- To list the available commands, use the code in the following examples:
$AdminTask help -commandsprint AdminTask.help(‘-commands’)Example output
WASX8004I: Available administrative commands: copyResourceAdapter - copy the specified J2C resource adapter to the specified scope createCluster - Creates a new application server cluster. createClusterMember - Creates a new member of an application server cluster. createJ2CConnectionFactory - Create a J2C connection factory deleteCluster - Delete the configuration of an application server cluster. deleteClusterMember - Deletes a member from an application server cluster. listConnectionFactoryInterfaces - list all of the defined connection factory interfaces on the specified J2C resource adapter. listJ2CConnectionFactories - List J2C connection factories that have a specified connection factory interface defined in the specified J2C resouce adapter createJ2CAdminObject - Create a J2C administrative object. listAdminObjectInterfaces - List all the defined administrative object interfaces on the specified J2C resource adapter. interface on the specified J2C resource adapter. listJ2CAdminObjects - List the J2C administrative objects that have a specified administrative object interface defined in the specified J2C resource adapter. createJ2CActivationSpec - Create a J2C activation specification. listMessageListenerTypes - list all of the defined messageListener type on the specified J2C resource adapter. listJ2CActivationSpecs - List the J2C activation specifications that have a specified message listener type defined in the specified J2C resource adapter.- To obtain help about a command group, use the code in the following examples:
$AdminTask help JCAManagementprint AdminTask.help(‘JCAManagement’)Example output
WASX8007I: Detailed help for command group: JCAManagement Description: A group of administrative commands that help to configure Java 2 Connector Architecture (J2C)-related resources. Commands: createJ2CConnectionFactory - Create a J2C connection factory listConnectionFactoryInterfaces - list all of the defined connection factory interfaces on the specified J2C resource adapter. listJ2CConnectionFactories - List J2C connection factories that have a specified connection factory interface defined in the specified J2C resouce adapter. createJ2CAdminObject - Create a J2C administrative object. listAdminObjectInterfaces - List all the defined administrative object interfaces on the specified J2C resource adapter. listJ2CAdminObjects - List the J2C administrative objects that have a specified adminstrative object interface defined in the specified J2C resource adapter. createJ2CActivationSpec - Create a J2C activation specification. listMessageListenerTypes - list all of the defined message listener types on the specified J2C resource adapter. listJ2CActivationSpecs - List the J2C activation specifications that have a specified message listener type defined in the specified J2C resource adapter. copyResourceAdapter - copy the specified J2C resource adapter to the specified scope.- To obtain help about an administrative command:
$AdminTask help createJ2CConnectionFactoryprint AdminTask.help(‘createJ2CConnectionFactory’)Example output
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: NoneIn the command-specific help output that is previously listed, an administrative command is divided into three input areas: target object, arguments, and steps. Each area can require input depending on the administrative command. If an area requires input, each input is described by its name and a description; except for the target object area, which contains the description of the target object only. When you use an administrative command in batch mode, use any input name that resides in the argument area as the argument name. If an input is required, an asterisk (*) is located before the name. If an area does not require an input, it is marked None. The following example uses the help output for the createJ2CConnectionFactory command:
- The target object area requires the configuration object name of a J2CResourceAdapter.
- In the arguments area, there are five inputs with three being required inputs. The argument names are connectionFactoryInterface, name, jndiName, description, and authDataAlias. These names are used as the parameter names in the option string to run an administrative command in batch mode, for example
See Administrative command invocation syntax for more information about specifying argument options.-connectionFactoryInterface javax.resource.cci.ConnectionFactory -name newConnectionFactory -jndiName CF/newConnectionFactory- No step is associated with this administrative command.
- To obtain help on a command step, use the step-specific help.
Step-specific help provides the following data:
- A description for the command step.
- Information indicating whether this step supports collection. A collection includes objects of the same type. In a command step, a collection contains objects that have the same set of parameters.
- Information regarding each step parameter with its name and description. If a step parameter is required, an asterisk (*) is located in front of the name.
The following example obtains help on a command step:
$AdminTask help createCluster clusterConfigprint AdminTask.help(‘createCluster’, ‘clusterConfig’)Example output
WASX8013I: Detailed help for step: clusterConfig Description: Specifies the configuration of the new server cluster. Collection: No Arguments: *clusterName - Name of server cluster. preferLocal - Enables node-scoped routing optimization for the cluster.This example indicates the following information about the clusterConfig step:
- This step does not support collection. Only one set of parameter values for the clusterName and perferLocal parameters is supported.
- This step contains two input arguments with one argument that is indicated as required. The required arguments is clusterName and the non-required parameter is preferLocal. The syntax to provide step parameter values is different from the command argument values. You have to provide all argument values of a step and provide them in the exact order as displayed in the step specific help. For any optional argument that you do not want to specify a value, put double quotes ("") in place of a value. If a command step is a collection type, for example, it can contain multiple objects where each object has the same set of arguments, one can specify multiple objects with each object enclosed by its own pair of braces. To run an administrative command in batch mode and to include this step in the option string, use the following syntax:
Jacl:
-clusterConfig {{newCluster false}}See Administrative command invocation syntax for more information about specifying parameter options.-clusterConfig [[newCluster false]]
See Also
AdminTask object for scripted administration
See Also
Commands for the AdminTask object