Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345954

Summary: Propagate session changes to the underlying cluster technology
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: 1.5 M1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 342407    

Description Rüdiger Herrmann CLA 2011-05-16 10:21:44 EDT
We must ensure to call HttpSession#setAttribute() in order to trigger the underlying cluster technology.

As noted in http://wiki.eclipse.org/Jetty/Tutorial/Session_Clustering, RAP "must call the Session.setAttribute() method to ensure that changes are persisted."

Same story with Tomcat:
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html: "Data is only replicated if the session has changed (by calling setAttribute or removeAttribute on the session). "
Comment 1 Rüdiger Herrmann CLA 2011-05-27 08:23:20 EDT
For now, I introduced an RWTClusterSupport class that acts as a servlet filter and thus must be registered in the web.xml (or another appropriate place) in order to work.
RWTCluster support does two things:
* before a request is processed, it (re-)attaches the session for the running request to the session store.
* after a request was processed, it marks the session as changed in that it re-sets the attribute in which the session store is held in the session.
Changes are in CVS HEAD.