+

Search Tips   |   Advanced Search

Set custom properties for resource environment entries using scripting


Use scripting to configure a new custom property for a 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 custom property for a resource environment entry:

 

  1. Identify the parent ID and assign it to the newree variable.

    • Jacl...

      set newree [$AdminConfig getid /Cell:mycell/Node:mynode/ResourceEnvEntry:REE1/]
    • Jython...

      newree = AdminConfig.getid('/Cell:mycell/Node:mynode/ResourceEnvEntry:REE1/') print newree

    For example...

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

  2. Create the J2EE custom property set:

    • Jacl...

      set propSet [$AdminConfig showAttribute $newree propertySet]
    • Jython...

      propSet = AdminConfig.showAttribute(newree, 'propertySet') print propSet

    For example...

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

  3. Identify the required attributes:

    • Jacl...

      $AdminConfig required J2EEResourceProperty
    • Jython...

      print AdminConfig.required('J2EEResourceProperty')

    For example...

    Attribute Type name String

  4. Set up the required attributes:

    • Jacl...

      set name [list name RP1] set rpAttrs [list $name]
    • Jython...

      name = ['name', 'RP1'] rpAttrs = [name]

  5. Create the J2EE custom property:

    • Jacl...

      $AdminConfig create J2EEResourceProperty $propSet $rpAttrs
    • Jython...

      print AdminConfig.create('J2EEResourceProperty', propSet, rpAttrs)

    For example...

    RPI(cells/mycell/nodes/mynode|resources.xml#J2EEResourceProperty_1)

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

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