Clean way to stop RMI server

前端 未结 2 559
粉色の甜心
粉色の甜心 2021-01-15 15:36

A RMI server which works fine without the stopServer functionality.

public class HelloServer extends UnicastRemoteObject implements HelloInterface
{
    priv         


        
2条回答
  •  渐次进展
    2021-01-15 16:20

    You need to store the result of LocateRegistry.createRegistry(), and unexport that. At present you're trying to unexport a stub.

提交回复
热议问题