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

Bug 344564

Summary: Replace lazy initialization in ContextProvider#getSession()
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: ruediger.herrmann
Version: 1.4   
Target Milestone: 2.1   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ralf Sternberg CLA 2011-05-03 08:54:18 EDT
Since ContextProvider#getSession() can be called by different threads, the unsynchronized lazy initialization pattern is dangerous at this place. This doesn't seem to be an issue at runtime, as the session is only initialized by RWTDelegate#createSessionStore().

However, instead of initializing the session lazily, we should introduce a dedicated init method that is called by RWTDelegate#createSessionStore().
Comment 1 RĂ¼diger Herrmann CLA 2011-05-18 08:24:47 EDT
LifeCycleServiceHandler#clearSessionStore() also (re-)initializes the session. Pleas take this into account when adressing this issue.
Comment 2 Ralf Sternberg CLA 2013-06-06 09:47:47 EDT
As of 2.1, the UISession (formerly SessionStore) is created and initialized in the RWTServlet at startup. In case of a session restart, a new UISession is created in LifeCycleServiceHandler.

There is no lazy initialization anymore.
Comment 3 Ralf Sternberg CLA 2013-06-06 09:49:23 EDT
*** Bug 393552 has been marked as a duplicate of this bug. ***