Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362847 - ServiceRegistry getService should return immediately
Summary: ServiceRegistry getService should return immediately
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 M1   Edit
Assignee: Simon Kaegi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 18:06 EDT by Simon Kaegi CLA
Modified: 2011-11-10 16:50 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 Simon Kaegi CLA 2011-11-03 18:06:48 EDT
Currently ServiceRegistry.getService(...) returns a promise instead of the service or null as with OSGi. At the time I thought this was clever because it meant we effectively had a ServiceTracker built right in. With experience I can see now that OSGi got the abstraction right and it's not helpful and actually causes us to take advantage of an implementation detail of dojo.Deferred when we want the service immediately.

ServiceRegistry.getService(...) should either return the Service or null immediately just like how it does with OSGi.
Comment 1 John Arthorne CLA 2011-11-04 08:36:27 EDT
I thought we took advantage of this asynchronous behaviour to avoid being sensitive to script load ordering differences. I guess we'll find out when you try changing it...
Comment 2 John Arthorne CLA 2011-11-04 12:04:19 EDT
If you're looking for the code you wrote for this bug, ping Susan ;)
Comment 3 Simon Kaegi CLA 2011-11-10 16:50:55 EST
Fixed in b2ca594c1adbf7494819a8ea545f6b50dd737879