Hi, Here is excerpt from Kathy's and Bert's book which raises me a questions: "Given a remote client 'R', that has valid references to session beans 'A' and 'B', and given that A is local to B, which statements are true? Amongst others I chose: A. R cannot pass his reference for A, to B. Is it possible that bean B will call business methods on bean A using the remote interface it has received from R client? I understand it might just keep the remote ref to A for some purpose to return it later back at R, maybe. But can B invoke business methods? R and A-B are running on different JVMs, and the reference passed is a stub, which was supposed to let access the bean A from R computer, and the B is might be on the other computer. Can you carry remote interface stub between JVM's and still access business methods using it???
I read this question and option B,A cannot pass his reference for B, to R D, B cannot invoke methods on R are correct because reference to local object must not be passed out the JVM in which it was created(According to spec),so in that case A is the local client for B and A cannot pass his reference to R for B becauae R is a remote client and exist into other JVM. A client can pass his local object reference to another application through its local inteface, A local home object reference cannot be passed as an argument or result of a method on an enterprise bean remote home or remote interface. Regards,