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

Bug 367155

Summary: [UICallBack] Sometimes the UICallBack response is empty string (with spaces only)
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: juergen.panser, stephan.leichtvogt
Version: 1.5   
Target Milestone: 1.5 M5   
Hardware: All   
OS: All   
Whiteboard:

Description Ivan Furnadjiev CLA 2011-12-20 04:12:58 EST
When UICallBack is activated in the IEntryPoint#createUI several UICallBack responses are empty (contained only spaces). I think that this is not expected.
Comment 1 Ivan Furnadjiev CLA 2011-12-20 04:41:45 EST
In UICallBackServiceHandler#service method there are two possibilities no to write a protocol message to the response:
1. UICallBackManager.getInstance().processRequest( response ) returns false
2. sessionStore.isBound() returns false
Testing the snippet from bug 367053 I found that we a running in point 1 - UICallBackManager.getInstance().processRequest( response ) returns false, because callBackRequestTracker.isActive( Thread.currentThread() ) returns false. And that's because callBackRequests.get( 0 ) != current thread. In this case callBackRequests.get( 1 ) == current thread.
Comment 2 Ivan Furnadjiev CLA 2011-12-20 04:48:40 EST
In this case we have two UICallBack requests running in the same time??!!
Comment 3 Ivan Furnadjiev CLA 2011-12-20 05:10:48 EST
The reason for the two UICallBack requests was a typo in UICallBack.js#sendUICallBackRequest - this.running instead of this._running. Fixed in CVS HEAD.
Comment 4 Ivan Furnadjiev CLA 2011-12-20 11:13:07 EST
Additionally, we changed the server-side code to return "empty" protocol message (valid JSON) instead of empty (spaces only) string. Trimming on the client is not needed anymore.
Comment 5 Ivan Furnadjiev CLA 2012-01-03 05:53:18 EST
*** Bug 367737 has been marked as a duplicate of this bug. ***