Reconnect RMI client after server restart

后端 未结 2 1393
你的背包
你的背包 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条回答
  •  旧时难觅i
    2020-12-30 07:17

    If you're using Spring (namely RmiProxyFactoryBean), you can simply set the property refreshStubOnConnectFailure to true and the bean will survive a restart of the server.

    
    

提交回复
热议问题