Peter Kriens wrote:
No, the ServiceTracker takes care of the problem that there are always
two cases:
1. A service is already registered. this means you will not get an
event on the service listener. You must get it from the registry.
2. A service will be registered, you get an event
Tracking these two cases is tricky and that is why we developed the
Service Tracker. Now you see only 3 events:
1. Adding
2. Modified properties
3. Removing
A LOT simpler ... in the early days of OSGi we found that we were all
making our own abstractions to handle this tracking so we decided it
was better if we standardized it.
Kind regards,
Peter Kriens
I admit that some days earlier that i have been experimenting with
these, I found ServiceListener a little bit tricky and all morning now
that I read about ServiceTracker it seems easier than before.
Neil Bartlett wrote:
Aggelos,
You have nothing to lose except your bugs! ;-)
Seriously though, I can't think of any reasonably use-cases that are
supported by ServiceListener but not possible in ServiceTracker.
Regards,
Neil
Well I think I made up my decision. The only thing left for this early
stage of settlement of mine, to osgi philosophy, is to finalize my
example-serviceTracker-oriented-for-testing-purposes-only application
and run it successfully through eclipse (using the knopflerfish plugin).
My Regards to all ,
Aggelos.
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev