ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafaqat Ali" <>
Subject client IP problem
Date Mon, 07 Aug 2006 09:16:08 GMT
         I want to check clients IP address and DNS and pass it to my
service, say Adder which is offering add( Integer x, Integer y ) method. For
this I have written a servlet which extends XmlRpcServlet. In doPost method
I get client ip from request object and store it in some class as static
data member. And in Add class I call that static method to get client IP.
         Now in case of one client it works fine but when more than one
clients come, there may be chance to over write clients ip. Because In My
Servlet in doPost method two statements are used
                server.execute(pRequest, pResponse);

Suppose two clients come. For first client say setIp is called and control
moves forward. In the mean time for second client setIp is called before
Adder's add method is called for first client. Now When I'll get IP of first
client in add method for first client, it is not valid now and IP of second
client is there ...

         Can any one suggest better solution. I tried a solution  on

Rafaqat Ali

View raw message