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

Bug 328142

Summary: [Discovery][Composite] Registering an IService(Type)Listener with OSGi service registry results in listeners notified twice
Product: [RT] ECF Reporter: Markus Kuppe <bugs.eclipse.org>
Component: ecf.discoveryAssignee: Markus Kuppe <bugs.eclipse.org>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3.0   
Target Milestone: 3.4.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 328278    
Bug Blocks: 328011    
Attachments:
Description Flags
mylyn/context/zip none

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/