Hi Been doing alot of research lately because we are re-writing our current project. I've noticed that inside one of our session bean implementations, we have method calls on OTHER objects by passing 'this'. Ex.
This is pseudo code so I hope it is clear. Let's also assume (cause it's true) that all object are properly initialised. Now because of how EJB's work, does this not break the model? I.E. We should be creating a handle to a remote interface of the SomeObjectSession object. Then the IRemoteSomeObjectSession should receive ALL the messages and step in as a translator / agent / interposer to the SomeObjectSession. When we pass 'this' to someOtherObject do we not break this model because the someOtherObject can now reference the SomeOtherSession instance directly? I am also curious how the container would react to this? What if your projedct was distributed, would your someOtherObject be talking to the right 'this'? All the references I've read about this say it's "bad" but they don't really give details. Thanks in advance.
[This message has been edited by John Bateman (edited March 02, 2001).]