Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.560 :

Posted: Thu Jan 10, 2013 10:10 pm
by ETS User
Why was written "...Non-remote objects must be passed by value"?

In the specification:

The classes that are exposed by the local interface of the bean may be tightly
coupled to the bean’s internal state. Instances of these classes are passed to
and from the client by reference and may therefore be modified by the client.
The Bean Provider should exercise care in determining what is exposed through the
local interface of the bean.

Re: About Question enthuware.oce-ejbd.v6.2.560 :

Posted: Fri Jan 11, 2013 6:24 am
by admin
Method calls in local interfaces not remote calls. The statement "Non-remote objects must be passed by value" is only for remote interfaces. In case of local interfaces this situation does not arise because nothing is remote. But in remote interfaces, a return type may be a remote or non remote object.

HTH,
Paul.

Re: About Question enthuware.oce-ejbd.v6.2.560 :

Posted: Tue Apr 28, 2015 12:23 pm
by himaiMinh
In the JSR 318 , p.47, it says:
Local calls involve pass-by-reference...
My notes:
1. For remote calls, argument objects (which are local to the client) are passed by pass-by-value to remote methods.
2. For local calls, argument objects are passed-by-reference to local methods.
Correct me if I am wrong.
Thanks.