This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
We have RestFul web application, where we are using GlobalApplicationSession HASHMAP from singleton class(SessionSingleTon) to maintain user's session.
Example, whenever users send first request, we will store userObjects(its an instance with xyz properties) in GlobalApplicationSession map
The same users send a request(2nd, 3rd time) again, we will check GlobalApplicationSession map whether the userid exists, if it exists then we will get some details (from the previous session) and process the curent request.
exmaple to get previous session details.
The question is, how can we handle if the application deployed in more than one server(tomcat) using clustered and loadbalancer.
first time, user1 sends request1 and load balancer direct the request to server1. The userObjects(its an instance with xyz properties) will be stored in GlobalApplicationSession hashmap which is available in server1
2nd time, user1 sends request2 and LOAD BALANCER DIRECT THE REQUEST TO SERVER2, now GlobalApplicationSession (in server2) will not have any userObjects.
How to handle this? can anyone explain?
subject: How to handle app in multiple server instance. Urgent