If you use a local interface added in the EJB 2.0 specifications, the overhead of the RMI-IIOP communication processing can be reduced, but remote invocation cannot be performed for an Enterprise Bean having only local interfaces. Furthermore, when using a local interface, you can operate the method arguments and return the values with the pass by reference functionality. Differentiate the use of a local interface and remote interface based on the following usage conditions of local interfaces:
- When the use of a local interface is recommended
- Hitachi recommends that you use a local interface when the Enterprise Bean and client (Enterprise Bean or JSP, servlet) are included in the same J2EE application.
- When the use of a local interface is mandatory
- The use of a local interface is mandatory for a CMP2.x CMR. You must, therefore, use a local interface.
- When a local interface cannot be used
- You cannot use a local interface in the following cases:
- When the Enterprise Bean and client (Enterprise Bean or JSP, servlet) are included in different J2EE applications.
- When the Enterprise Bean and client (Enterprise Bean or JSP, servlet) are executed on another J2EE server (separate JavaVM).
- When already implemented in EJB 1.1.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.