RMI server: rmiregistry or LocateRegistry.createRegistry

前端 未结 4 1532
灰色年华
灰色年华 2021-02-05 15:29

For RMI on server-side, do we need to start rmiregistry program, or just call LocateRegistry.createRegistry? If both are possible, what are the advant

4条回答
  •  盖世英雄少女心
    2021-02-05 16:17

    If you are writing a standalone java application you would want to start your own rmiregistry but if you are writing a J2EE app that obviously runs inside a J2EE container then you want to "LocateRegistry" as there is already one running on the app server!

提交回复
热议问题