This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
The problem scenario is: In a cluster environment, an object is saved in session by one node, and then one of that saved object's attribute is updated as follows: 1. session.setAttribute(ObjectName, value); 2. ObjectName sessObject = (ObjectName)session.getAttribute(ObjectName); 3. sessObject.updateAttribute1(); //which updates attribute1 of sessObject Then the failover scenario occurs where the request is sent to the other node. Now, we don't see the updated attribute of the saved session object when the 2nd node tries to process it.
My question is, do we need to explicitly set the object in session again every time there is an attribute change? I mean, do we need to have the following setAttribute line everytime we update any attribute of that object to keep the session object up to date? session.setAttribute(ObjectName, value);
We're pleased to have you here with us in the Servlets forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.