You can use wsadmin scripting to configure a new resource environment entry.
Before you begin
Before starting this task, the wsadmin tool must be running. For more information, see
Iniciando o Cliente de Script wsadmin Usando o Script wsadmin. Also, you must create a resource environment provider.
For more information, see the configuration topic on new resource environment providers.
About this task
Perform the following steps to configure a new resource environment entry.
Procedure
- Identify the parent ID and assign it to the newrep variable.
Example output:
REP1(cells/mycell/nodes/mynode|resources.xml#ResourceEnvironmentProvider_1)
- Identify the required ResourceEnvEntry attribute:
Example output:
Attribute Type
name String
jndiName String
- Set up the required attributes:
Using Jacl:
set name [list name REE1]
set jndiName [list jndiName myjndi]
set resEnvRefAttrs [list $name $jndiName]
Using Jython:
name = ['name', 'REE1']
jndiName = ['jndiName', 'myjndi']
resEnvRefAttrs = [name, jndiName]
- Set up the required attributes and configure the new reference:
Using Jacl:
set newResEnvRef [$AdminConfig create ResourceEnvEntry $newrep $resEnvRefAttrs]
Using Jython:
newref = AdminConfig.create('ResourceEnvEntry', newrep, resEnvRefAttrs)
print newref
Example output:
(cells/mycell/nodes/mynode|resources.xml#ResourceEnvEntry_1)
- Save the configuration changes. For more information, see the Saving configuration changes with
the wsadmin tool topic.
- In a network deployment environment only, synchronize the node. For more information, see the
Synchronizing nodes with the wsadmin tool topic.