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 wsadmin 스크립트를 사용하여 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.

주제 유형을 표시하는 아이콘 태스크 주제



시간소인 아이콘 마지막 업데이트 날짜: July 9, 2016 6:14
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_enventry
파일 이름:txml_enventry.html