• Post Reply Bookmark Topic Watch Topic
  • New Topic

HttpSession invalid across clones

 
Neel Krish
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
We are using HttpSession as follows:
HttpSession ses = req.getSession(true) in the first/default request handler and,
req.getSession(false) in all other handlers.

The very first request comes to appserver clone1 and it works fine and a page is delivered. A link in the delivered page now goes to a different handler. This second request comes to appserver clone2 and our appln fails because we are getting an invalid session (session=null).
We are using WAS3.5.3. Is this something to with the configs or should this be coded differently. If somebody can explain why this happens it would be really useful.
Thanks,
Neel
 
Veena Rani
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Neel,
I haven't worked with 3.5 but WAS4.0 supports server affinity that way subsequent requests are directed to the same clone.
Both clone1 and clone2 are on the same m/c or on the different m/c(I mean u are using horizonatal or vertical clustering)
I think for this to work you can use session persistence feature of the app server so that seession information is available to all the clones in the cluster
Veena
 
Neel Krish
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Veena,
Clones are in different m/c's. And we have set the session persistence as true. What does session affinity actually do? Does it send all the requests of a particular session to the same clone? Does this mean that load management happens at a whole session level rather than at individual requests level? And would you happen to know how to set this value?
Thanks a lot for your input.
-Neel
Originally posted by Veena Rani:
Hi Neel,
I haven't worked with 3.5 but WAS4.0 supports server affinity that way subsequent requests are directed to the same clone.
Both clone1 and clone2 are on the same m/c or on the different m/c(I mean u are using horizonatal or vertical clustering)
I think for this to work you can use session persistence feature of the app server so that seession information is available to all the clones in the cluster
Veena
 
Veena Rani
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Neel,
If session persistence is set to true, the session should be available to all the clones. I think session affinity is supported by default in WAS.I don't have any more inputs on this.
Are you using any other software for like servlet redirector, network dispatcher etc. for load balancing?
You can post this to WebSphere forum. Kyle Brown can provide some info in that forum.
Veena
 
Neel Krish
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Veena Rani:
Hi Neel,
If session persistence is set to true, the session should be available to all the clones. I think session affinity is supported by default in WAS.I don't have any more inputs on this.
Are you using any other software for like servlet redirector, network dispatcher etc. for load balancing?
You can post this to WebSphere forum. Kyle Brown can provide some info in that forum.
Veena

We deleted and recreated the session datasource also. Even then this pblm is persisting. Ok, I will post this in the WenSphere forum. Thanks a lot.
-Neel
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!