JBoss Community

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

created by jingjing jiang in JBoss AS 7 Development - View the full discussion

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? :|

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community