Configure new resource environment entries using scripting

 

Procedure

  1. Start wsadmin

  2. 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)
    

  3. Identify the required attributes:

    • Jacl:

      $AdminConfig required ResourceEnvEntry
      

    • Jython

      print AdminConfig.required('ResourceEnvEntry')
      

    Example output:

    Attribute     Type
    name      String
    jndiName   String
    referenceable   Referenceable@
    

  4. 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]
      

  5. Create the resource environment entry:

    • Jacl:

      $AdminConfig create ResourceEnvEntry $newrep $reeAttrs
      $AdminConfig save
      

    • Jython

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

    Example output:

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

  6. In a network deployment environment only, synchronize the node.


 

See Also


AdminConfig object for scripted administration

 

See Also


Commands for the AdminConfig object