uCosminexus Application Server, EJB Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

2.11.5 Timeout of RMI-IIOP communication

A timeout value can be set for communication between the EJB client and the CORBA Naming Service, and between the EJB client and the Enterprise Beans. Furthermore, if you deploy CTM in between the EJB client and a J2EE server, you can set up a communication timeout between the EJB client and the CTM and between the CTM and a J2EE server.

To set up a timeout for an RMI-IIOP communication, use the request timeout functionality of Cosminexus TPBroker that is used as the RMI-IIOP communication platform by the EJB container.

Depending on the range of the timeout to be specified, you specify a timeout either using the property of the definition file or using the APIs that Application Server provides.

Organization of this subsection
(1) RMI-IIOP communications for which a timeout can be specified
(2) Specification range and timing of communication timeout
(3) Processing of the client when a communication timeout occurs

(1) RMI-IIOP communications for which a timeout can be specified

The following figure shows the RMI-IIOP communications (for which a timeout can be specified) working with/without CTM, and also explains the range of timeout:

Figure 2-14 Communications for which a timeout can be specified (when CTM linkage exists)

[Figure]

Figure 2-15 Communications for which a timeout can be specified (when CTM linkage does not exist)

[Figure]

The timeout for RMI-IIOP communications can be set up at three locations that are indicated by A, B, and C in the figure.

(2) Specification range and timing of communication timeout

Use this functionality to specify the communication timeout for ORB. In other words, the communication timeout is set for all the RMI-IIOP communications below ORB.

The time of setting a timeout value is during the execution of the first new javax.naming.InitialContext() after invocation of the client.

Even if you do not use the CORBA Naming Service, when you use this functionality, execute new javax.naming.InitialContext() at the beginning of client processing.

(3) Processing of the client when a communication timeout occurs

If a response is not returned for the request from the client within the value specified in the properties, the request is cancelled as a timeout. When a communication timeout occurs due to this functionality, an java.rmi.RemoteException (org.omg.CORBA.TIMEOUT) exception is thrown. In a client using this functionality, the occurrence of this exception must be considered during invocation of business methods of the Enterprise Beans.