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 J2C activation specs:
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 listMessageListenerTypes $newraUsing Jython:
AdminTask.listMessageListenerTypes(newra)Example output:
javax.jms.MessageListener
$AdminTask createJ2CActivationSpec $newra { -name ac1 -jndiName eis/ac1 -message ListenerType javax.jms.MessageListener}Using Jython:
AdminTask.createJ2CActivationSpec(newra, ['-name', 'ao1', '-jndiName', 'eis/ao1', '-message', 'ListenerType', 'javax.jms.MessageListener'])
$AdminConfig required J2CActivationSpecUsing Jython:
print AdminConfig.required('J2CActivationSpec')Example output:
Attribute Type activationSpec ActivationSpec@
$AdminConfig list ActivationSpec $newraUsing Jython:
print AdminConfig.list('ActivationSpec', $newra)
set ac ActivationSpecID set name [list name J2CAC1] set jname [jndiName eis/j2cac1] set j2cacAttrs [list $name $jname]Using Jython:
ac = ActivationSpecID name = ['name', 'J2CAC1'] jname = ['jndiName', 'eis/j2cac1'] j2cacAttrs = [name, jname]
set cdcttr [list activationSpec $ac]Using Jython:
cdattr = ['activationSpec', ac]
$AdminConfig create J2CActivationSpec $newra $j2cacAttrsUsing Jython:
print AdminConfig.create('J2CActivationSpec', newra,j2cacAttrs)Example output:
J2CAC1(cells/mycell/nodes/mynode|resources.xml#J2CActivationSpec_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