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

Bug 372858

Summary: Exception in the first POST request prevents application from restart (F5)
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: 1.5   
Target Milestone: 1.5 M6   
Hardware: All   
OS: All   
Whiteboard:

Description Ivan Furnadjiev CLA 2012-02-29 10:03:24 EST
To reproduce it:
1. Open a browser and type a wrong entry point - error message appear for "missing entry point".
2. Fix the entry point and press ENTER to restart the session - as a result you have an empty screen.
3. Press F5 again - application starts normally. 
With the re-factorings for bug 372296 we marked the session as initialized *after* the execution of the life cycle. In case of exception in the life cycle, session was not marked as initialized and a s a result the next request was not recognized as session restart. Session store was no cleared and UI thread continue to wait for a session timeout.
Comment 1 Ivan Furnadjiev CLA 2012-02-29 11:41:47 EST
Put markSessionInitialized in a finally block. JUnit test added. Changes are in CVS HEAD.
Comment 2 Ralf Sternberg CLA 2012-02-29 15:40:19 EST
If an exception _prevents proper initialization_, should the session then be _marked as initialized_. Even if this fixes our problem, I wonder if we then have a conceptual flaw? Or just bad naming?
Comment 3 Ivan Furnadjiev CLA 2012-02-29 15:50:04 EST
(In reply to comment #2)
> If an exception _prevents proper initialization_, should the session then be
> _marked as initialized_. Even if this fixes our problem, I wonder if we then
> have a conceptual flaw? Or just bad naming?
markSessionInitialized means that request with "rwt_initialize" parameter (first POST after the GET request) has been processed. Better naming!!?? Maybe.
Comment 4 Ralf Sternberg CLA 2012-02-29 15:58:24 EST
Actually the flag does not indicate that any initialization has taken place. It only indicates that the first request is through, i.e. the session has started. SESSION_STARTED? SESSION_RUNNING?
Comment 5 Ivan Furnadjiev CLA 2012-02-29 16:06:47 EST
(In reply to comment #4)
> Actually the flag does not indicate that any initialization has taken place.
It indicates that the session store and UIThread has been initialize. But SESSION_STARTED sounds good to me too. INITIALIZED vs STARTED?
Comment 6 Ralf Sternberg CLA 2012-03-02 13:26:09 EST
I'd prefer SESSION_STARTED. It doesn't sound like an assertion of any successful initialization.
Comment 7 Ivan Furnadjiev CLA 2012-03-02 13:50:23 EST
(In reply to comment #6)
> I'd prefer SESSION_STARTED. It doesn't sound like an assertion of any
> successful initialization.
Renamed.