"A client can pass a local home object reference to another application through its local interface. A local home object reference cannot be passed as an argument or result of a method on an enterprise bean�s remote home or remote interface"
Can't understand this point !!!
Does this means, a Client (this will most probably a bean) cannot pass local home object to a remote bean ??? [ June 21, 2004: Message edited by: Giju George ]
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCEA
posted 12 years ago
A local home or component reference only makes sense in the context of the container in which the bean is running. Since a remote reference can be used by potentially any client (app or bean) outside of the container in which the bean is running, it does not make sense to let a remote interface pass around local reference because the local reference will not be of any use to the client using the remote interface. Remember that local interface make local calls and not RMI call. Thus, a local call will only work within the container. If you pass a local stub (i.e., reference to a local home or component interface) through the remote interface, the remote client will get a local stub which has no idea on how to marshall the method call since its job is to invoke methods by reference as in any normal Java program.