开发者

RMI understanding question

everyone. I got general idea about RMI, but still need to understand some detail开发者_开发百科s. 1) Who generates stub object: server or RMI registry? 2) Where does client get stub class to deserialize stub object? Thanks.


  1. RMI creates the stub when you export your remote object. If it extends UnicastRemoteObject this occurs on construction, otherwise it occurs when you call exportObject().

  2. As you aren't using rmic, the stub class is a dynamic proxy: java.lang.reflect.Proxy. The client already has that class in the JRE. So the client only needs the remote interface class and any application classes that it depends on, and so on recursively until closure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜