Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Configure servers with scripting
Configure an ORB service using scripting
We can use wsadmin.sh 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, you 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:
AdminServerManagement.configureORBService(nodeName, serverName, requestTimeout, requestRetriesCount, requestRetriesDelay, connectionCacheMax, connectionCacheMin, locateRequestTimeout, otherAttributeList)For additional information and argument definitions, see the documentation for the AdminServerMananagment script library.
Procedure
- Start wsadmin.sh.
- 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/]### 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 WAS 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 Jython command Example output:
server1(cells/mycell/nodes/mynode/servers/server1|server.xml#Server_1)
- 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]### 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 Jython command Example output:
(cells/mycell/nodes/mynode/servers/server1|server.xml#ObjectRequestBroker_1)
- 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}}### 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
- Save the configuration changes.
Save the configuration changes:
AdminConfig.save()
- Synchronize the node.
Use the syncActiveNodes script in the AdminNodeManagement script library to propagate the changes to all active nodes:
AdminNodeManagement.syncActiveNodes()
Use the wsadmin scripting AdminConfig object for scripted administration
Related
ORB tuning guidelines
ORB service settings
Server settings configuration scripts
Node administration scripts
Commands for the AdminConfig object using wsadmin.sh