Configuring new resource environment entries using wsadmin scripting

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

  1. Identify the parent ID and assign it to the newrep variable.
    • Using Jacl:

      set newrep [$AdminConfig  getid  /Cell:mycell/Node:mynode/ResourceEnvironmentProvider:REP1/]
    • Using Jython:

      newrep = AdminConfig.getid('/Cell:mycell/Node:mynode/ResourceEnvironmentProvider:REP1/') 
      print newrep
    Example output:
    REP1(cells/mycell/nodes/mynode|resources.xml#ResourceEnvironmentProvider_1)
  2. Identify the required ResourceEnvEntry attribute:
    • Using Jacl:

      $AdminConfig required ResourceEnvEntry
    • Using Jython:

      print AdminConfig.required('ResourceEnvEntry')
    Example output:
    Attribute          Type
    name               String
    jndiName           String
  3. 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]
  4. 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)
  5. Save the configuration changes. For more information, see the Saving configuration changes with the wsadmin tool topic.
  6. In a network deployment environment only, synchronize the node. For more information, see the Synchronizing nodes with the wsadmin tool topic.

Ícone que indica o tipo de tópico Tópico de Tarefa



Ícone de registro de data e hora Última atualização: July 9, 2016 7:58
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_enventry
Nome do arquivo: txml_enventry.html