Example: Configuring custom properties for URL providers using wsadmin
An example configuring a new custom property for URL providers follows:
- Identify the parent ID and assign it to the newurlp variable.
Using Jacl:
set newurlp [$AdminConfig getid /Cell:mycell/Node:mynode/URLProvider:URLP1/]
An example of this output follows:
URLP1(cells/mycell/nodes/mynode:resources.xml#URLProvider_1)
Using Jython:
newurlp = AdminConfig.getid('/Cell:mycell/Node:mynode/URLProvider:URLP1/') print newurlp
- Get the J2EE resource property set:
Using Jacl:
set propSet [$AdminConfig showAttribute $newurlp propertySet]
An example of this output follows:
(cells/mycell/nodes/mynode:resources.xml#PropertySet_7)
Using Jython:
propSet = AdminConfig.showAttribute(newurlp, '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 RP2] set rpAttrs [list $name]
Using Jython:
name = ['name', 'RP2'] rpAttrs = [name]
- Create a J2EE resource property:
Using Jacl:
$AdminConfig create J2EEResourceProperty $propSet $rpAttrs
An example of this output follows:
RP2(cells/mycell/nodes/mynode:resources.xml#J2EEResourceProperty_1)
Using Jython:
print AdminConfig.create('J2EEResourceProperty', propSet, rpAttrs)
- Save the changes with the following command:
Using Jacl:
$AdminConfig save
Using Jython:
AdminConfig.save()