Before you begin
Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.Why and when to perform this task
Perform the following steps to configure a new J2C connection factory:
Steps for this task
Using Jacl:
set newra [$AdminConfig getid /Cell:mycell/Node:mynode/J2CResourceAdapter:RAR1/]
newra = AdminConfig.getid('/Cell:mycell/Node:mynode/J2CResourceAdapter:RAR1/') print newra
RAR1(cells/mycell/nodes/mynode|resources.xml#J2CResourceAdapter_1)
Using Jacl:
$AdminTask listConnectionFactoryInterfaces $newra
Using Jacl:
AdminTask.listConnectionFactoryInterfaces(newra)
Example output:
javax.sql.DataSource
Using Jacl:
$AdminTask createJ2CConnectionFactory $newra { -name cf1 -jndiName eis/cf1 -connectionFactoryInterface avax.sql.DataSource
Using Jacl:
AdminTask.createJ2CConnectionFactory(newra, '['-name', 'cf1', '-jndiName', 'eis/cf1', '-connectionFactoryInterface', 'avax.sql.DataSource']')
Using Jacl:
$AdminConfig required J2CConnectionFactory
print AdminConfig.required('J2CConnectionFactory')
Attribute Type connectionDefinition ConnectionDefinition@
Using Jacl:
$AdminConfig list ConnectionDefinition $newra
print AdminConfig.list('ConnectionDefinition', $newra)
Using Jacl:
set name [list name J2CCF1] set j2ccfAttrs [list $name] set jname [list jndiName eis/j2ccf1]
name = ['name', 'J2CCF1'] j2ccfAttrs = [name] jname = ['jndiName', eis/j2ccf1]
Using Jacl:
set cdattr [list connectionDefinition $cd]
cdattr = ['connectionDefinition', $cd]
Using Jacl:
$AdminConfig create J2CConnectionFactory $newra $j2ccfAttrs
print AdminConfig.create('J2CConnectionFactory', newra, j2ccfAttrs)
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