Well, the simplest solution is in hardware. Many hardware load-balancers (such as Cisco LocalDirector) and high-end software ones have a feature colloquially referred to as sticky-bit, that will qualify its typical round-robin with a rule:
If a connection from IP address X is dispatched to Webserver A, a subsequent request from IP X will also be dispatched to A if it is received within a given timeout n, and A is accepting requests. Implicit within the above statement is the fact that the cache timeout is reset to n seconds upon every connection--so long as he clicks around every twenty minutes or so, he should be fine. Obviously, it is important to set the LocalDirector cache timeout _higher_ than your session timeout. You are in production and finding out about this now?!?! If it is urgent, a LocalDirector or other Destination Address Translation box with Sticky-bit capability will fix your problem. BTW, If you are planning on clustering servlet engines (Just about all WebLogic J2EE stacks support clustered persistence, I think), then you need to make use of the javax.servlet.Http.HttpSessionActivationListener interface. The void sessionDidActivate(HttpSessionEvent se) void sessionWillPassivate(HttpSessionEvent se) methods allow your code to say "Whoa! I am about to get serialized and passed to another VM!" And do some cleanup on all your non-serializable stuff (db connections, session beans, etc.) On the receiving end, your code can say "Whoa, I need to go get my resources again before somebody asks me for that shopping cart that I no longer have!" -----Original Message----- From: Narendranatha R Sajjala [mailto:[EMAIL PROTECTED]] Sent: Friday, January 04, 2002 12:45 PM To: 'Struts Users Mailing List' Subject: controller servlet session lost Hi, we are using 5 web servers WeblogicEnterprice where all my jsp's and servlets are residing, and we have a cluster of WLS for EJB's. Load balancing on webservers is done by third party software. Now the problem is first time user hits the website the load balancer transfers the request to one webserver where controller servlet is invoked but next request from the same user may transferred to another webserver based on load on loadbalence at that time ,i am loosing the session. is there any solution for this problem. i don't want to cluster webservers. narendra [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>