Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328142 - [Discovery][Composite] Registering an IService(Type)Listener with OSGi service registry results in listeners notified twice
Summary: [Discovery][Composite] Registering an IService(Type)Listener with OSGi servic...
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.discovery (show other bugs)
Version: 3.3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.4.0   Edit
Assignee: Markus Kuppe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 328278
Blocks: 328011
  Show dependency tree
 
Reported: 2010-10-19 11:16 EDT by Markus Kuppe CLA
Modified: 2010-10-20 15:11 EDT (History)
0 users

See Also:


Attachments
mylyn/context/zip (75.65 KB, application/octet-stream)
2010-10-20 03:33 EDT, Markus Kuppe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Kuppe CLA 2010-10-19 11:16:10 EDT
If a consumer registers its IService(Type)Listeners via the OSGi whiteboard pattern while using the CompositeDiscoveryProvider, listeners will receive discovery events twice. The second discovery event originates from the nested discovery provider inside the CompositeDiscoveryProvider. 

In general it is questionable if the CompositeDiscoveryProvider makes sense in the OSGi context where the OSGi service registry/whiteboard pattern takes over the CompositeDiscoveryProvider functionality WRT listener handling.
Comment 1 Markus Kuppe CLA 2010-10-20 03:33:38 EDT
Added functionality to specify for which discovery container the listener gets registered in the OSGi service registry.
Comment 2 Markus Kuppe CLA 2010-10-20 03:33:41 EDT
Created attachment 181258 [details]
mylyn/context/zip
Comment 3 Markus Kuppe CLA 2010-10-20 15:11:19 EDT
Fix with bug #328278 and verified in build https://build.ecf-project.org/hudson/job/C-HEAD-discovery.feature/lastSuccessfulBuild/