Configure new resource environment entries
Use wsadmin scripting to configure a new resource environment entry.
Before starting this task, wsadmin.sh must be running. For more information, see Start the wsadmin scripting client . Also, create a resource environment provider. For more information, see the configuration topic on new resource environment providers.
To configure a new resource environment entry:
- Identify the parent ID and assign it to the newrep variable.
Jacl:
set newrep [$AdminConfig getid /Cell:mycell/Node:mynode/ResourceEnvironmentProvider:REP1/]
Jython:
newrep = AdminConfig.getid('/Cell:mycell/Node:mynode/ResourceEnvironmentProvider:REP1/') print newrep
Example output:
REP1(cells/mycell/nodes/mynode|resources.xml#ResourceEnvironmentProvider_1)
- Identify the required ResourceEnvEntry attribute:
Jacl:
$AdminConfig required ResourceEnvEntry
Jython:
print AdminConfig. required('ResourceEnvEntry')
Example output:
Attribute Type name String jndiName String
- Set up the required attributes:
Jacl:
set name [list name REE1] set jndiName [list jndiName myjndi]
Jython:
name = ['name', 'REE1'] jndiName = ['jndiName', 'myjndi']
- Identify the required Referenceable attribute:
Jacl:
$AdminConfig required Referenceable
Jython:
print AdminConfig. required('Referenceable')
Example output:
Attribute Type factoryClassname String classname String
- Set up the required attributes and configure the new reference:
Jacl:
set f1 [list factoryClassname fClass1] set c1 [list classname Class1] set refAttrs [list $f1 $c1] set newref [$AdminConfig create Referenceable $newrep $refAttrs]
Jython:
f1 = ['factoryClassname', 'fClass1'] c1 = ['classname', 'Class1'] refAttrs = [f1, c1] newref = AdminConfig.create('Referenceable', newrep, refAttrs) print newref
Example output:
(cells/mycell/nodes/mynode|resources.xml#Referenceable_1)
- Save the configuration changes. For more information, see the Saving configuration changes with wsadmin.sh topic.
- In a network deployment environment only, synchronize the node. For more information, see the Synchronizing nodes with wsadmin.sh topic.
Related tasks
Use the wsadmin scripting AdminConfig object for scripted administration Configure new resource environment providers Saving configuration changes with wsadmin.sh Synchronize nodes using wsdmin.sh Start the wsadmin scripting client
Commands for the AdminConfig object