You can use scripting and the wsadmin tool to configure new J2C administrative objects.
Before starting this task, the wsadmin tool must be running. See the topic on starting the wsadmin tool.
Perform the following steps to configure a J2C administrative object:
Using Jacl:
set newra [$AdminConfig getid /Cell:mycell/Node:mynode/J2CResourceAdapter:RAR1/]
Using Jython:
newra = AdminConfig.getid('/Cell:mycell/Node:mynode/J2CResourceAdapter:RAR1/')
print newra
RAR1(cells/mycell/nodes/mynode|resources.xml#J2CResourceAdapter_1)
Using Jacl:
$AdminTask listAdminObjectInterfaces $newra
Using Jython:
AdminTask.listAdminObjectInterfaces(newra)
Example output:
com.ibm.test.message.FVTMessageProvider
Using Jacl:
$AdminTask createJ2CAdminObject $newra { -name ao1 -jndiName eis/ao1
-adminObjectInterface com.ibm.test.message.FVTMessageProvider }
Using Jython:
AdminTask.createJ2CAdminObject(newra, ['-name', 'ao1', '-jndiName', 'eis/ao1',
'-adminObjectInterface', 'com.ibm.test.message.FVTMessageProvider'])
Using Jacl:
$AdminConfig required J2CAdminObject
Using Jython:
print AdminConfig.required('J2CAdminObject')
Example output:
Attribute Type
adminObject AdminObject@
Using Jacl:
$AdminConfig list AdminObject $newra
Using Jython:
print AdminConfig.list('AdminObject', $newra)
Using Jacl:
set ao AdminObjectId
set name [list name J2CAO1]
set jname [jndiName eis/j2cao1]
set j2caoAttrs [list $name $jname]
Using Jython:
ao = AdminObjectId
name = ['name', 'J2CAO1']
set jname = ['jndiName', eis/j2cao1]
j2caoAttrs = [name, jname]
Using Jacl:
set cdattr [list adminObject $ao]
Using Jython:
cdattr = ['adminObject', ao]
Using Jacl:
$AdminConfig create J2CAdminObject $newra $j2caoAttrs
Using Jython:
print AdminConfig.create('J2CAdminObject', newra, j2caoAttrs)
Example output:
J2CAO1(cells/mycell/nodes/mynode|resources.xml#J2CAdminObject_1)