Reconnect RMI client after server restart

后端 未结 2 1401
你的背包
你的背包 2020-12-30 06:54

I have an RMI server and a desktop RMI client. When I restart the server, I get errors in the client. Is it possible to restart the RMI connection without restarting the cli

2条回答
  •  醉酒成梦
    2020-12-30 07:04

    When the server is terminated, you will receive a ConnectException. After that you can just use Naming.lookup to get a new server object.

提交回复
热议问题