Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
Perform the following steps to configure a new J2C connection factory:
set newra [$AdminConfig getid /Cell:mycell/Node:mynode/J2CResourceAdapter:RAR1/]
newra = AdminConfig.getid('/Cell:mycell/Node:mynode/J2CResourceAdapter:RAR1/') print newra
Example output:
RAR1(cells/mycell/nodes/mynode|resources.xml#J2CResourceAdapter_1)
$AdminTask listConnectionFactoryInterfaces $newra
AdminTask.listConnectionFactoryInterfaces(newra)
Example output:
javax.sql.DataSource
$AdminTask createJ2CConnectionFactory $newra { -name cf1 -jndiName eis/cf1 -connectionFactoryInterface avax.sql.DataSource
AdminTask.createJ2CConnectionFactory(newra, '['-name', 'cf1', '-jndiName', 'eis/cf1', '-connectionFactoryInterface', 'avax.sql.DataSource']')
$AdminConfig required J2CConnectionFactory
print AdminConfig.required('J2CConnectionFactory')
Example output:
Attribute Type connectionDefinition ConnectionDefinition@
$AdminConfig list ConnectionDefinition $newra
print AdminConfig.list('ConnectionDefinition', $newra)
set name [list name J2CCF1] set j2ccfAttrs [list $name] set jname [list jndiName eis/j2ccf1]
name = ['name', 'J2CCF1'] j2ccfAttrs = [name] jname = ['jndiName', eis/j2ccf1]
set cdattr [list connectionDefinition $cd]
cdattr = ['connectionDefinition', $cd]
$AdminConfig create J2CConnectionFactory $newra $j2ccfAttrs
print AdminConfig.create('J2CConnectionFactory', newra, j2ccfAttrs)
Example output:
J2CCF1(cells/mycell/nodes/mynode|resources.xml#J2CConnectionFactory_1)
Related concepts
AdminConfig object for scripted administration
AdminTask object for scripted administration
Related reference
Commands for the AdminConfig object
Commands for the AdminTask object