Re: Do classes implementing Remote interfaces need to be Serializable?
Gregg Wonderly <[email protected]> Wed, 27 Sep 2006 23:32:04 -0500
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <[email protected]> |
Peter-Frank Spierenburg wrote: > All the > examples that I have seen on the web however, use subclasses of > UnicastRemoteObject which is Serializable. My fear is that the client > can get hold of a SessionFactoryImpl or SessionImpl instance instead of > the corresponding stub. Is this possible, or is UnicastRemoteObject > responsible for ensuring that all nonlocal references to it are stubs? The UnicastRemoteObject details cause "stub replacement" to occur for any attempt to serialize the UnicastRemoteObject. The result is that noone ever sees the object, but instead receives the remote proxy implementation. Gregg Wonderly =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff RMI-USERS". For general help, send email to [email protected] and include in the body of the message "help". For a list of frequently asked RMI questions please refer to: http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html To view past RMI-USERS postings, please see: http://archives.java.sun.com/archives/rmi-users.html