How can you get the calling ip address on an ejb call?

后端 未结 4 1132
失恋的感觉
失恋的感觉 2020-12-19 22:23

If a java client calls a remote EJB on a different server, how can you get the client IP address? Note that it is important to get it from the server, because the client is

4条回答
  •  -上瘾入骨i
    2020-12-19 22:29

    Have you tried: java.rmi.server.RemoteServer.getClientHost() ?

    http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/server/RemoteServer.html#getClientHost()

提交回复
热议问题