when invoking a EJB method, it seems that all parameters are copied by value (cloned) rather than by reference:
client : temp.ObjectC@2710
EJB method : temp.ObjectC@1169
All the books are saying, that this is NOT the case - Monson-Haefel even has an own chapter about "Passing objects by Value" to an EJB.
Maybe its just my environment : VAJ 3.02 + WebSphere Testenvironment
Does anybody have similar experiences with passing parameres by reference to an EJB ???
EJB uses RMI technology.
according to RMI specification all the parameters are passed by value.
if u dont want to pass ur parameters by value, there is another solution.
u make all ur parameters as remote objects.
(implement remote interface with ur parameter classes)
then RMI will pass only the stubs of the parameters and not the entire parameter.
All objects except the Home and Remote interfaces MUST be passed by copy in EJB.
Internet Applications Division