Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367155 - [UICallBack] Sometimes the UICallBack response is empty string (with spaces only)
Summary: [UICallBack] Sometimes the UICallBack response is empty string (with spaces o...
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.5 M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 367737 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-20 04:12 EST by Ivan Furnadjiev CLA
Modified: 2012-01-03 05:53 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***