axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From santhoshs123 <santhoshs...@gmail.com>
Subject Cookie getting overwritten when client connects to multiple servers.
Date Wed, 06 Mar 2013 22:40:54 GMT
We have client-server deployment implemented using Axis2 where multiple
clients can connect to a single server and also a single client can connect
to multiple servers(many - many), all connections are statefull.

Since many clients can connect to a single server and each connection is
statefull, we are internally maintaining stateful sessions in the server. In
the initial login call from client, we create a new internal session in the
server and assign Cookie "SESSIONID" to http response, so that for further
requests from the client internal session will be identified using the
cookie "SESSIONID" attached to the request.

Problem: when client connects to two servers, cookie set in the first server
gets overwritten by cookie set in the second server.
1. Client connects to Server1.
2. Server1 creates and attaches Cookie "SESSIONID" with value 1.
3. Further requests from Client to Server1 are successful as it uses cookie
with value 1.
4. Client connects to Server2.
5. Server2 creates and attaches Cookie "SESSIONID" with value 2.
6. Further requests from Client to Server2 are successful as it uses cookie
with value 2.
7. From now on any requests to Server1 is having cookie with value 2, looks
like cookies value got overwritten in client side.
8. Since the cookie value 2 is not recognized in Server1, it rejects.

Please let me know how we can avoid overwriting of cookie? Is there any
settings available? Or in client, do I need to manually persist cookie
information for each server connection and set the corresponding cookie
information to MessageContext property before calling any request?

Thanks in advance.

-Santhosh



--
View this message in context: http://axis.8716.n7.nabble.com/Cookie-getting-overwritten-when-client-connects-to-multiple-servers-tp111918.html
Sent from the Axis Java - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message