This chapter describes how to optimize the method of invoking the Enterprise Bean.
Normally, the Enterprise Bean is invoked through an RMI-IIOP by using the remote interface. In this method, the overheads are similar to those in the case of remote connection, even when invoked from the Enterprise Bean running in the same J2EE application and the same J2EE server.
The following methods can be used in optimizing the method of invoking the Enterprise Bean and enhancing the throughput:
Each of these methods has the following features as listed in the table below. In this table, the methods are compared on the basis of four features that are as follows:
Determine the method to be used based on the features of the application and system.
Table 8-18 Features of the methods of invoking Enterprise Bean
Type of method used for invocation | Standard specifications | Performance | Location transparency | Maintainability |
---|---|---|---|---|
Local interface | F | F | N | F |
Local invocation of remote interface | F | P | F | F |
Pass by reference for remote interface | N | F | P | N |
For more details about local interface, see the EJB specifications.
For details about the local invocation of the remote interface and the pass by reference of the remote interface, see 2.13 Invoking EJB remote interface in the uCosminexus Application Server EJB Container Functionality Guide.