Implications of restricting RMI to one port

我怕爱的太早我们不能终老 提交于 2019-12-03 16:12:41

wouldn't it block multiple simultaneous connections?

No.

Is it possible to bind these remote objects on the same port as the registry? My intuition says no, as the port would already be bound by the createRegistry() call.

Yes, as long as you start the registry in the same JVM, via LocateRegistry.createRegistry(), and as long as any server socket factories involved are equal().

Are there other implications I am ignorant of?

There are no implications at all. RMI does port sharing between remote objects with null or equal server socket factories, and TCP does port sharing between multiple connections to the same port.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!