WAS v8.5 > Script the application serving environment (wsadmin) > Configure servers with scripting

Configure an ORB service using scripting

We can use wsadmin to configure an Object Request Broker (ORB) service in the environment. An ORB manages the interaction between clients and servers, using the Internet InterORB Protocol (IIOP). It enables clients to make requests and receive responses from servers in a network-distributed environment.

There are two ways to perform this task. Complete the steps in this topic to use the AdminConfig object to modify your ORB configuration. Alternatively, we can use the configureORBService Jython script in the AdminServerManagement script library to configure settings for the ORB service. The wsadmin tool automatically loads the script when the tool starts. Use the following syntax to configure JVM settings using the configureORBService script:

For additional information and argument definitions, see the documentation for the AdminServerMananagment script library.

  1. Start the wsadmin scripting tool.

  2. Identify the application server and assign it to the server variable.

    Use the AdminConfig object and the getid command to retrieve the configuration ID of the server of interest, as the following example demonstrates:

    • Jacl:

        set s1 [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
    • Using Jython:
      s1 = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/')
      print s1 

    AdminConfig getid command description . The previous commands consist of the following elements:

    Element Description
    set Jacl command
    s1 Variable name
    $ Jacl operator for substituting a variable name with its value
    AdminConfig Object representing the WebSphere Application Server configuration
    getid AdminConfig command
    Cell Object type
    mycell Name of the object that will be modified
    Node Object type
    mynode Name of the object that will be modified
    Server Object type
    server1 Name of the object that will be modified
    print Jython command

    Example output:

      server1(cells/mycell/nodes/mynode/servers/server1|server.xml#Server_1)

  3. Determine the ORB that belongs to the server.

    Use the AdminConfig object and the list command to identify the ORB that belongs to the server and assign it to the orb variable, as the following example demonstrates:

    • Jacl:

        set orb [$AdminConfig list ObjectRequestBroker $s1]
    • Using Jython:
      orb = AdminConfig.list('ObjectRequestBroker', s1)
      print orb

    AdminConfig list command description . The previous commands consist of the following elements:

    Element Description
    set Jacl command
    orb Variable name
    $ Jacl operator for substituting a variable name with its value
    AdminConfig Object representing the WAS configuration
    list AdminConfig command
    ObjectRequestBroker AdminConfig object
    s1 Evaluates to the ID of server of interest
    print Jython command

    Example output:

      (cells/mycell/nodes/mynode/servers/server1|server.xml#ObjectRequestBroker_1)

  4. Modify the ORB configuration attributes.

    The following example modifies the connection cache maximum and pass by value attributes. We can modify the example to change the value of other attributes.

    • Jacl:

        $AdminConfig modify $orb {{connectionCacheMaximum 252} {noLocalCopies true}}
    • Using Jython:

        AdminConfig.modify(orb, [['connectionCacheMaximum', 252], ['noLocalCopies', 'true']])

    AdminConfig modify command description . The previous commands consist of the following elements:

    Element Description
    $ Jacl operator for substituting a variable name with its value
    AdminConfig Object representing the WAS configuration
    modify AdminConfig command
    orb Evaluates to the ID of ORB
    connectionCacheMaximum Attribute
    252 Value of the connectionCacheMaximum attribute
    noLocalCopies Attribute
    true Value of the noLocalCopies attribute

  5. Save the configuration changes.

    Use the following command example to save your configuration changes:

      AdminConfig.save()


Related


Use the wsadmin scripting AdminConfig object for scripted administration


Reference:

Object Request Broker tuning guidelines
Object Request Broker service settings
Server settings configuration scripts
Commands for the AdminConfig object using wsadmin.sh


+

Search Tips   |   Advanced Search