Just wanted to add a little bit of background on the semantics around addingService() In OSGi, every callback to addingService() represents a separate service in the OSGi Framework (either a local or a distributed service) and every removedService() call represents a service that has been removed. The bug you were seeing was caused by a bug in the cleanup of statically registered services, where the service should have been removed when a bundle containing the remote-services.xml file was stopped. This removal didn't happen but when that bundle was started again the service did get registered again hence the multiples...
Hope that 1.2-SNAPSHOT version fixes it for you too. David 2010/3/25 David Bosschaert <[email protected]>: > Hi Nick, > > I have been able to reproduce your problem with CXF-DOSGi 1.1. > The good news is that it seems to be fixed on trunk. Try installing > the single bundle distro from [1] and see if that helps. > > Hope this helps, > > David > > [1] > https://repository.apache.org/content/groups/snapshots/org/apache/cxf/dosgi/cxf-dosgi-ri-singlebundle-distribution/1.2-SNAPSHOT/cxf-dosgi-ri-singlebundle-distribution-1.2-SNAPSHOT.jar > > 2010/3/24 Pan Nick <[email protected]>: >> >> Hi, >> I am new to DOSGi, and I have some question about the starter demo project >> hosted at >> http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html >> My client and server are running Felix 2.0.1. >> Interaction between them seems to be working fine (invoking services >> between OSGi containers); however, I noticed that the addingService >> (function calls of the ServiceTracker on client side) are executed multiple >> times which leads to duplicates of the same OSGi service being added to the >> client. More precisely, a service tracker is created within a client OSGi >> bundle to track an OSGi service offered by the server; however, the >> addingService function of the tracker is run multiple times when the client >> bundle is activated. >> This can be prevented by adding a unique-check at the addingService(), but I >> am wondering is the above scenario working as intended? If not, is anyone >> getting this as well? >> Thanks,Nick >> >> _________________________________________________________________ >> 除了電子信箱,更有許多有用的功能。快來使用免費的 Windows Live Hotmail。 >> https://signup.live.com/signup.aspx?id=60969 >
