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

Moderator: admin

Post Reply
ETS User

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

Post 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.

admin
Site Admin
Posts: 10386
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

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

Post 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests