Invoke an administrative command in interactive mode
Overview
Perform the following steps to invoke an administrative command in interactive mode. To invoke an administrative command in batch mode, see Invoking an administrative command in batch mode.Invoke the AdminTask object commands interactively, in a script, or use the wsadmin -c command from an operating system command prompt.
Use the following command invocation to enter interactive mode without providing another input in the command invocation:
$AdminTask commandName {-interactive}AdminTask.commandName([-interactive])
Use the following command invocation to enter interactive mode using an administrative command that takes a target object. You do not have to provide a target object to enter interactive mode. Target objects provided in the command invocation will be applied to the command and displayed as the current target object value during interactive prompting.
$AdminTask commandName targetObject {-interactive}AdminTask.commandName(targetObject, [-interactive])
Use the following command invocation to enter interactive mode for an administrative command that takes options. You do not have to provide other options to enter interactive mode. Options provided in the command invocation are applied to the command and the option values will be displayed as the current values during interactive prompting.
$AdminTask commandName {-interactive commandOptions}AdminTask.commandName([-interactive commandOptions])
Use the following command invocation to enter interactive mode for an administrative command that has a target object and options. You do not have to specify a target object to enter interactive mode. The values specified are applied to the command before the command data is displayed. As a result, the values specified will be displayed as the current values during interactive prompting.
$AdminTask commandName targetObject {-interactive commandOptions}AdminTask.commandName(targetObject, [-interactive commandOptions])
Example
The following example invokes an administrative command in interactive mode by specifying the -interactive option:
$AdminTask createJ2CConnectionFactory {-interactive}AdminTask.createJ2CConnectionFactory('[-interactive]')Example output
Create a J2C connection factory *The J2C resource adapter: "WebSphere Relational ResourceAdapter (cells/myCell/nodes/myNode|resources.xml#builtin_rra)" A connection factory interface (connectionFactoryInterface):javax.resource.cci.ConnectionFactory *Name (name): myJ2CCF *The JNDI name (jndiName): j2c/cf Description (description): authentication data alias (authDataAlias): create J2C connection factory F (Finish) C (Cancel) Select [F, C]: [F] myJ2CCF(cells/myCell/nodes/myNode|resources.xml#J2CConnectionFactory_1069690568269)The following example invokes an administrative command using the –interactive option with a target object that is specified in the command invocation:
set ra [$AdminConfig getid /J2CResourceAdapter:myResourceAdapter/] $AdminTask createJ2CConnectionFactory $ra {-interactive}ra = AdminConfig.getid('/J2CResourceAdapter:myResourceAdapter/') AdminTask.createJ2CConnectionFactory(ra, ‘[-interactive]’)Example output
Create a J2C connection factory *The J2C resource adapter: ["WebSphere Relational ResourceAdapter (cells/myCell/nodes/myNode|resources.xml#builtin_rra)"] A connection factory interface (connectionFactoryInterface): javax.resource.cci.ConnectionFactory *Name (name): myJ2CCF *The JNDI name (jndiName): j2c/cf Description (description): authentication data alias (authDataAlias): create J2C Connection Factory F (Finish) C (Cancel) Select [F, C]: [F] myJ2CCF(cells/myCell/nodes/myNode|resources.xml#J2CConnectionFactory_1069690568269)The following example invokes an administrative command using the –interactive option where both the target object and the additional command options are specified in the command invocation:
set ra [$AdminConfig getid /J2CResourceAdapter:myResourceAdapter/] $AdminTask createJ2CConnectionFactory $ra {-name myNewCF -interactive}ra = AdminConfig.getid('/J2CResourceAdapter:myResourceAdapter/') AdminTask.createJ2CConnectionFactory(ra, ‘[-name myNewCF -interactive]’)Example output
Create a J2C connection factory *The J2C resource adapter: ["WebSphere Relational ResourceAdapter (cells/myCell/nodes/myNode|resources.xml#builtin_rra)"] A connection factory interface (connectionFactoryInterface):javax.resource.cci.ConnectionFactory *Name (name): [myNewCF] *The JNDI name (jndiName): j2c/cf Description (description): authentication data alias (authDataAlias): create J2C Connection Factory F (Finish) C (Cancel) Select [F, C]: [F] myNewCF(cells/myCell/nodes/myNode|resources.xml#J2CConnectionFactory_3839439380269)
See also
Administrative command interactive mode environment