posted 13 years ago
The Remote interface is a step up from Serializable. With Remote objects, you can actually retrieve both object state and interface definition out of a directory (as you do with EJB homes) or by return values from other Remote objects (as with EJB remote).
All you get is the interface definition though, not the implementation. When you call a method on a remote object, what really happens is that you call a stub implementation on the client side, which implements your interface. The stub method marshals the parameters ... that is it prepares them to be sent across the network ... and then sends a message to the server. On the server side, a skeleton implementation receives the message, parses it, and makes the call on the real object. For return values the same process happens in reverse.
If you want a deeper understanding of how EJBs work, I suggest running through a tutorial on RMI. EJBs abstract some of the details away from, but you get to see it all with RMI.