Invoking an administrative command in interactive mode using wsadmin scripting
These steps demonstrate how to invoke an administrative command in interactive mode.
About this task
The steps describe how to invoking an administrative command in interactive mode.
To invoke an administrative command in batch mode, see the topic on invoking a command batch mode.
Procedure
Example
The following example invokes an administrative command in interactive mode by specifying the -interactive option:
Using Jacl:$AdminTask createJ2CConnectionFactory {-interactive}
Using Jython: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:
Using Jacl:set ra [$AdminConfig getid /J2CResourceAdapter:myResourceAdapter/] $AdminTask createJ2CConnectionFactory $ra {-interactive}
Using Jython: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:
Using Jacl:set ra [$AdminConfig getid /J2CResourceAdapter:myResourceAdapter/] $AdminTask createJ2CConnectionFactory $ra {-name myNewCF -interactive}
Using Jython: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)