2.13.1 Optimizing local invocation in the EJB remote interface

This subsection explains the optimization of local invocation in the remote interface of EJB.

The methods defined in the remote interface of EJB are invoked by RMI-IIOP, however, local invocation optimization can be applied to this invocation.

Note that the methods defined in the local interface of EJB are not invoked by using RMI-IIOP, but a normal Java invocation method is used, therefore, this functionality is not applicable.

When optimizing local invocation in the remote interface, you can select the range for optimizing the local invocation. Customize the properties of a J2EE server to specify the range for optimization. For details on customizing the operation settings of a J2EE server, see 2.13.5 Settings in the execution environment.

The following table describes the correspondence between the range and the operations of the functionality for optimizing local invocation and the values specified in the keys of a J2EE server properties (usrconf.properties):

Table 2-40 Range and operations of functionality for optimizing local invocation

ItemsValue of ejbserver.rmi.localinvocation.scope key#
AllappNone
Range of local invocation optimizationWithin the same J2EE serverWithin the same applicationThere is no range
Thread configurationCaller and Callee are always in the same threadCaller and Callee are in the same thread only in the same applicationCaller and Callee are always in different threads
Class loader configurationEJB is loaded by the container class loader (J2EE server unit)EJB is loaded by the application class loader (application unit)
Local transactionCan be used in a J2EE serverCan be used in the same applicationCan be used in the same J2EE component
#
This is a key specified in usrconf.properties.