Can of anyone of you guys plz explain the following statement from the spec.
In general, the references that are passed across the local interface cannot be used outside of the immediate call chain and must never be stored as part of the state of another enterprise bean.�
What i could comprehend from the above was ... The reference variables that are used through out the local interface should not be passed out side of this call sequence scenario..that is as an argument to other component since this reference on this JVM becomes invalid on the other.
Is it...(i think there is more to what i have comprehended.)
Please explain me with a practical scenario.....what is this call chain (besides being a sequence of calls).
Two other doubts of mine.... 1) We can call a local home object from a remote client view (session facade).i.e. session bean making a call to another entity bean locally. 2)Can ther be a situation wher we call the a session bean from a remote client view...which(session bean) is again making calling other local bean which inturn is making call to remote bean using its remote client view. (can a local interface make use of remote client view.)
When using the local interfaces the objects are passed by reference. Because an object can be passed as an argument, the whole bean's current state could have been accessed from anywhere in the call chain. A bean provider should'nt try to save this current state in another object or a different bean. That's basically 'don't capture the beans current state'.
If you store the object as bean instance state, which is passed in argument of local interface method call, you can modify the bean state without call beans method. Because the local interface method take arguments by object reference, after the method call, you can modify the objects which impact on bean's instance state.So it hurt the security and beaness, etc.
So we have to avoid the above,
That implies In general, the references that are passed across the local interface must never be stored as part of the state of another enterprise.
So that spec also another one restriction, we can use that objects in Chain of method call occurenace. Other than this places don't use[beans state etc ].
These are points, i could understand. Any other points as well as comments on my points also welcome.