But why the arguments for the local interface client view are designed as passing by reference? Java does not support pass by reference.
For remote interface view, parameters are serialized by the container before sending to the wire, and then they get deserialized from the wire into new object on receiving side.
If you have a mutable object with a state, and you pass that object as a parameter to remote
EJB, and after you have completed the remote call you will change the state of the object on client side - the object received on remote side will remain unaffected. Because these are two different objects now.
For the local interface and no interface view, the object is passed in a same way as in Java SE. That is, object is passed by reference and reference is passed by value. As a result, both sender and receiver will have the same object, and changes made with the object by either sender or receiver part will affect the opposite part.