+

Search Tips   |   Advanced Search

Set new resource environment entries using scripting


Use scripting and wsadmin to configure a new resource environment entry.

Before starting this task, wsadmin must be running. See the Start wsadmin article for more information.

Perform the following steps to configure a new resource environment entry:

 

  1. 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

    For example...

    REP1(cells/mycell/nodes/mynode|resources.xml#ResourceEnvironmentProvider_1)

  2. Identify the required attributes:

    • Jacl...

      $AdminConfig required ResourceEnvEntry
    • Jython...

      print AdminConfig.required('ResourceEnvEntry')

    For example...

    Attribute Type name String jndiName String referenceable Referenceable@

  3. Set up the required attributes:

    • Jacl...

      set name [list name REE1]
      set jndiName [list jndiName myjndi]
      set newref [$AdminConfig getid /Cell:mycell/Node:mynode/Referenceable:/]
      set ref [list referenceable $newref]
      set reeAttrs [list $name $jndiName $ref]
    • Jython...

      name = ['name', 'REE1'] jndiName = ['jndiName', 'myjndi']
      newref = AdminConfig.getid('/Cell:mycell/Node:mynode/Referenceable:/')
      ref = ['referenceable', newref]
      reeAttrs = [name, jndiName, ref]

  4. Create the resource environment entry:

    • Jacl...

      $AdminConfig create ResourceEnvEntry $newrep $reeAttrs
    • Jython...

      print AdminConfig.create('ResourceEnvEntry', newrep, reeAttrs)

    For example...

    REE1(cells/mycell/nodes/mynode|resources.xml#ResourceEnvEntry_1)

  5. Save the configuration changes. See the Saving configuration changes with wsadmin article for more information.

  6. In a network deployment environment only, synchronize the node. See the Synchronizing nodes with wsadmin article for more information.

 

Related tasks


Use the AdminConfig object for scripted administration

 

Related


Commands for the AdminConfig object