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...
Question
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.
Solution
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...