OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/J
An RPC that uses the name service constitutes a service request that can be executed from a Java application or servlet. It cannot be executed from a Java applet due to security limitations.
This section explains the RPC flow that uses the name service and the definition necessary for distributing the service request destination schedulers among RPCs.
To issue an RPC that uses the name service, specify dcnamuse=Y in the TP1/Client/J environment definition. Also specify the dchost and dcnamport operands in the TP1/Client/J environment definition or specify the nam server with the setDchost method. Before calling an rpcCall method, you must call an rpcOpen method. At the end of the CUP, you must call an rpcClose method.
The following figure shows the flow of a service request when the name service is used.
Figure 2-7 Flow of a service request when the name service is used
When you use this facility, you cannot issue an RPC to an SPP that receives requests from a socket. If you specify a value of 2 or greater for the dccltrpcmaxmsgsize operand of the TP1/Client/J environment definition, an RPC using the name service collects information only from services that are running on a TP1/Server that supports the rpc_max_message_size operand of the system common definition. Even when the input parameter length for the service exceeds the value in the rpc_max_message_size operand of the system common definition at the service request destination, the service request is executed. You cannot issue an RPC to an SPP on a TP1/Server that does not support the rpc_max_message_size operand of the system common definition.
When RPCs use the name service, you can store the information on the service request destination schedulers from the name server into the cache, and distribute the service request destination schedulers among RPCs by referencing the information in the cache. To distribute the service request destination schedulers among RPCs, the following definitions are necessary for TP1/Client/J and TP1/Server.
To distribute the service request destination schedulers among RPCs, specify dccltloadbalance=Y in the TP1/Client/J environment definition.
With this setting, TP1/Client/J acquires information on multiple service request destination schedulers from the name server and stores the information on the service request destination scheduler having the lowest load level in the cache. One or more service request destination schedulers may be stored in the cache.
If multiple service request destination schedulers are stored in the cache, the first service request destination scheduler is selected at random. If the service request from an RPC is the second or subsequent one, the cache is referenced to obtain information on service request destination schedulers, and service request destination schedulers are switched in the round-robin mode and distributed among the RPCs.
When operands are specified in the TP1/Server definitions listed below, the scheduler load information is also acquired when information on the service request destination schedulers is acquired from the name server.
If the communication destination TP1/Server is in the multi-homed host environment, an RPC that uses the name service may encounter a communication error. This is caused when the network where the CUP resides cannot communicate with the network adapter that corresponds to the host name (IP address) specified by the my_host operand in the system common definition of the communication destination TP1/Server.
To avoid this problem, specify dccltnammlthost=Y in the TP1/Client/J environment definition. The following figure shows two network configuration examples and shows whether the dccltnammlthost operand of TP1/Client/J environment definition is required in each of these network configurations.
Figure 2-8 Example of issuing an RPC to TP1/Server in the multi-homed host environment
For the CUP in network configuration example 2 to be able to communicate with IP address 4, dccltnammlthost=Y must be specified in the TP1/Client/J environment definition. Without this specification, a communication error occurs between the CUP and IP address 4.
If the communication destination TP1/Server is in the multi-homed host environment, and the service request destination SPP resides on the same TP1/Server, specifying dccltnammlthost=Y in the TP1/Client/J environment definition enables the issuance of an RPC. If a TP1/Server residing on a network to which no CUP is connected is specified in the all_node operand of the system common definition of the communication destination TP1/Server, an attempt to issue an RPC to an SPP on the first TP1/Server causes an error. If the communication destination TP1/Server is not in the multi-homed host environment, you can issue an RPC regardless of the specification in the dccltnammlthost operand of the TP1/Client/J environment definition.
All Rights Reserved. Copyright (C) 2006, 2009, Hitachi, Ltd.