Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Scripting for Mail, URLs, and other Java EE resources > Configure mail, URLs, and resource environment entries with wsadmin scripting


Configure new resource environment entries using wsadmin scripting

We can use wsadmin scripting to configure a new resource environment entry. See Start the wsadmin scripting client using wsadmin.sh. Also, create a resource environment provider. See the configuration topic on new resource environment providers.

Configure a new resource environment entry:


Procedure

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

  2. Identify the required ResourceEnvEntry attribute:

      ### Jacl

      $AdminConfig required ResourceEnvEntry
      

      ### Jython

      print AdminConfig.required('ResourceEnvEntry')
      

    Example output:

    Attribute   Type
    name         String jndiName      String 

  3. Set up the required attributes:

      ### Jacl

      set name [list name REE1]
      set jndiName [list jndiName myjndi]
      

      ### Jython

      name = ['name', 'REE1']
      jndiName = ['jndiName', 'myjndi']
      

  4. Identify the required Referenceable attribute:

      ### Jacl

      $AdminConfig required Referenceable
      

      ### Jython

      print AdminConfig.required('Referenceable')
      

    Example output:

    Attribute    Type
    factoryClassname String classname    String 

  5. Set up the required attributes and configure the new reference:

      ### Jacl

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

      ### 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. See the Saving configuration changes with wsadmin.sh topic.

  7. Synchronize the node. See the Synchronizing nodes with wsadmin.sh topic.


Use the wsadmin scripting AdminConfig object for scripted administration
Configure new resource environment providers using wsadmin.sh
Saving configuration changes with wsadmin.sh
Synchronize nodes using wsadmin.sh
Start the wsadmin scripting client using wsadmin.sh


Related


Commands for the AdminConfig object using wsadmin.sh

+

Search Tips   |   Advanced Search