Server via RMI without registry

后端 未结 3 472
囚心锁ツ
囚心锁ツ 2021-02-06 15:49

I have a service object that can be connected to via RMI. Currently I\'m doing this:

Server

Registry r = LocateRegistry.createRegistry(1         


        
3条回答
  •  暖寄归人
    2021-02-06 16:13

    Not impossible, but not terribly practical because the registry communicates the stub object of the exported object to the client (see http://www.developer.com/print.php/3455311). If you don't have another mechanism for that, you'll be stuck. Use of a registry in distributed systems has other benefits, so I'd actually recommend keeping it for other reasons (location transparency, etc).

提交回复
热议问题