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 Starting the wsadmin scripting client using wsadmin scripting. 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]
    • Using Jython:
      name = ['name', 'REE1']
      jndiName = ['jndiName', 'myjndi']
  4. Identify the required Referenceable attribute:
    • Using Jacl:

      $AdminConfig required Referenceable
    • Using Jython:

      print AdminConfig.required('Referenceable')
    Example output:
    Attribute				Type
    factoryClassname	String
    classname				String
  5. Set up the required attributes and configure the new reference:
    • Using Jacl:

      set f1 [list factoryClassname fClass1]
      set c1 [list classname Class1]
      set refAttrs [list $f1 $c1]
      set newref [$AdminConfig create Referenceable $newrep $refAttrs]
    • Using Jython:

      f1 = ['factoryClassname', 'fClass1'] 
      c1 = ['classname', 'Class1']
      refAttrs = [f1, c1]
      newref = AdminConfig.create('Referenceable', newrep, refAttrs)
      print newref

    Example output:

    (cells/mycell/nodes/mynode|resources.xml#Referenceable_1)
  6. Save the configuration changes. For more information, see the Saving configuration changes with the wsadmin tool topic.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 4:16:02 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-base-dist&topic=txml_enventry
File name: txml_enventry.html