2 Replies Latest reply on Jul 30, 2013 12:14 PM by jingjingjiang1986

    How to get the client IP in a EJB when a method is called?

    jingjingjiang1986

      Recently, i meet with a problem, that I don't know how to get the client ip on server side when a EJB's method is called by remote client.

      We use JBoss 7.1.1 as the appliction server.

      The client application GUI is based on NetBeans platform, so we are having used the C/S architecture.

       

      @Stateless

      public class MyEJB implements MyInterface {

       

              @Override

              public void doSomething() {

                     // when the method is called by a remote client, I need know the client's IP

                     // get the client ip, and then ...

              }

      }

       

      Anybody can help me?