axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: Cookie getting overwritten when client connects to multiple servers.
Date Tue, 12 Mar 2013 09:52:10 GMT
MG> options.setManageSession(true);
public void setManageSession(boolean manageSession)
Set session management enabled state. When session management is enabled, the engine will
automatically send session data (such as the service group id, or HTTP cookies) as part of
manageSession - true if enabling sessions
you are specifically requesting your cookies be session scoped.. (not request or application)



> Date: Tue, 12 Mar 2013 02:18:07 -0700
> From:
> To:
> Subject: Re: Cookie getting overwritten when client connects to multiple servers.
> After more investigation found that we can get rid of this by setting unique
> cookie names for each of the servers. If we set unique cookie names, axis
> sends all those cookies to each server along with every API call. This
> solution does not look that clean and if there are huge number of
> servers(lets say 500) to which our client is connecting to at any given
> point in time then we will end up having(and sending) 500 cookies along with
> each API call(if not restricted).
> Later with more investigation found that Axis2 provides us a feature to
> avoid overwriting of cookies with same names when connected to multiple
> servers by setting the custom cookie id. By going through Axis source
> code(, I think Axis tries to extract the cookie with
> name Constants.CUSTOM_COOKIE_ID(set using setProperty) from the response and
> attaches it to ServiceContext so that the next request to that server will
> be attached with cookie extracted in previous response.
> I tried doing this but was not successful in getting the expected results,
> still the cookies were getting overwritten. Hope and wish that I am doing
> some thing wrong here, below is how I set Constants.CUSTOM_COOKIE_ID
> ServiceClient serviceClient = stub._getServiceClient()
> Options options = serviceClient.getOptions();
> options.setManageSession(true);
> options.setTimeOutInMilliSeconds(timeoutInMilliseconds);
> options.setProperty(Constants.CUSTOM_COOKIE_ID, "XXXSESSIONID");
> serviceClient.setOptions(options);
> After this I expect Axis to handle the cookie overwriting but does not seem
> like that. I feel there is something wrong the way I am setting the
> property.
> Guys, please let me know your views on this. I am completely stuck with this
> problem.
> Note: we are using scope=application and that cannot be changed.
> --
> View this message in context:
> Sent from the Axis Java - Dev mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
View raw message