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

1.3k Views Asked by At

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 are 1 best solutions below

0
On BEST ANSWER

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