tags:

views:

355

answers:

1

Im using a org.osgi.util.tracker.ServiceTracker (PrintableServiceTracker implements ServiceTrackerCustomizer and simply prints when a new service is added).

Filter filter = bc.createFilter("(objectClass=se.enea.print.Printable)");
         tracker = new ServiceTracker(bc, filter, new PrintableServiceTracker(bc));

I've read about "pseudo registration" in the new ebook "OSGi in action" and I wonder if I have to do pseudo registration explicitly or if the framwork handles this automatically?

(Will already installed Printable services be caught by the ServiceTracker. will ServiceTracker.addingService(ServiceReference) be called for each of the pre installed Printable services)

+3  A: 

Not sure what pseudo registration means, but the method addingService in PrintableServiceTracker will be called not only for new services but also for existing services.

jassuncao