Configure a new J2C connection factory using wsadmin

 

An example configuring a new J2C resource factory follows...

 

Using Jacl...

### Identify the parent ID and assign it to the newra variable.
set newra [$AdminConfig getid /Cell:cell/Node:node/J2CResourceAdapter:RAR1/]

### Identify the required attributes...
$AdminConfig required J2CConnectionFactory

### Set up the required attributes...
set name [list name J2CCF1]
set j2ccfAttrs [list $name]

###  Create a connection factory...
$AdminConfig create J2CConnectionFactory $newra $j2ccfAttrs


$AdminConfig save

 

Using Jython:

newra = AdminConfig.getid('/Cell:cell/Node:node/J2CResourceAdapter:RAR1/')
print newra

print AdminConfig.required('J2CConnectionFactory')

name = ['name', 'J2CCF1']
j2ccfAttrs = [name]

print AdminConfig.create('J2CConnectionFactory', newra, j2ccfAttrs)


AdminConfig.save()