I've been looking for a portable means of obtaining a calling client's IP address from within a server-side JBoss/EJB Interceptor, with no success. Currently, my system requires the client IP address so that the Interceptor can associate it with some limited monitoring information, which is then delivered elsewhere for further processing - the limited discussion I have found regarding this problem suggests a few possible routes, but the only viable one I've come across is to write my own Invoker code - is this correct? And if this is the case, is there anywhere I should start looking in order to go about it (unfortunately, I am relatively new to JBoss, and have been concentrating almost entirely on Interceptors).
I would also appreciate it if someone could tell me for sure if there is no portable solution to this problem, or perhaps if there is some other client-specific information that is more easily obtainable, then at least I could get back to the drawing board! :-)
There is no portable way to do this.
You would have to write your own invoker that associated the request endpoint address with each request. Look at the org.jboss.invocation.pooled.server.PooledInvoker code.