How to get the Client ip address in an EJB3 Interceptor?

陌路散爱 提交于 2019-12-08 11:01:55

问题


Often it's useful for Auditing or security purposes to get the IP Address of the client making a remote EJB3 Call. This information is not readily available in the Context of an EJB3 Bean. Here's a hack to be able to achieve this in JBoss 4.x.


回答1:


There is an answer on this page https://community.jboss.org/wiki/HowToGetTheClientIpAddressInAnEJB3Interceptor?_sscc=t

Basically it uses the thread name to obtain the ip address as each call is launched in its own thread...



来源:https://stackoverflow.com/questions/18748442/how-to-get-the-client-ip-address-in-an-ejb3-interceptor

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