uCosminexus Application Server, EJB Container Functionality Guide

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

2.13.2 Referencing and passing the values of the EJB remote interface

Normally, if an EJB method containing a remote interface is invoked, the arguments and the return value are copied and passed by value, however, the arguments and the return value can also be passed by reference. When the values are passed by reference, the aim is to reduce the load as compared to copying the values and passing them.

When passing the values by reference, you need to pay attention to the changes in the arguments and the return value and to the deployment of the client and application wherein values are passed by reference, since the arguments and the return value are referenced directly.

When the objects with the java.io.Serializable interface implemented are defined in the arguments or the return value of a method, you can expect a reduction in the load by pass by reference of EJB remote interface values. You can expect better results when the number and size of the objects is larger.

The two methods of setup are explained below. If setup is performed using either of the following methods, the pass by reference of values is enabled: