Example: Configuring custom properties for J2C connection factories using wsadmin
An example configuring a new custom property for a J2C resource factories follows:
- Identify the parent ID and assign it to the newcf variable:
Using Jacl:
set newcf [$AdminConfig getid /J2CConnectionFactory:J2CCF1/]
An example of this output follows:
J2CCF1(cells/mycell/nodes/mynode:resources.xml#J2CConnectionFactory_1)
Using Jython:
newcf = AdminConfig.getid('/J2CConnectionFactory:J2CCF1/') print newcf
- Get the J2EE resource property set:
Using Jacl:
set propSet [$AdminConfig showAttribute $newcf propertySet]
An example of this output follows:
(cells/mycell/nodes/mynode:resources.xml#PropertySet_8)
Using Jython:
propSet = AdminConfig.showAttribute(newcf, 'propertySet') print propSet
- Identify the required attributes:
Using Jacl:
$AdminConfig required J2EEResourceProperty
An example of this output follows:
Attribute Type name String
Using Jython:
print AdminConfig.required('J2EEResourceProperty')
- Set up the required attributes:
Using Jacl:
set name [list name RP4] set rpAttrs [list $name]
Using Jython:
name = ['name', 'RP4'] rpAttrs = [name]
- Create a J2EE resource property:
Using Jacl:
$AdminConfig create J2EEResourceProperty $propSet $rpAttrs
An example of this output follows:
RP4(cells/mycell/nodes/mynode:resources.xml#J2EEResourceProperty_8)
Using Jython:
print AdminConfig.create('J2EEResourceProperty', propSet, rpAttrs)
- Save the changes with the following command:
Using Jacl:
$AdminConfig save
Using Jython:
AdminConfig.save()