On May 25, 2010, at 3:17 AM, Rick McGuire wrote: > 2) The ProviderLocator. This is how APIs that need to resolve providers > access the registry information. The provider registry is an OSGi service, so > the ProviderLocator needs a bundle context instance to resolve the service > instance. The Activator manages obtaining the bundle context at activation > and setting up a service tracker to give access to the registry service. The > ProviderLocator code manages the details of locating a loading a service > instance and will revert to classic classpath behavior if used outside of an > OSGi environment.
On this note, I'm trying to determine what the performance impact might be in a large OSGi environment. Looks like the Activator always enables a ServiceTracker and that tracker appears to look for the ProviderRegistry service on every call. Is that a correct and do you have any idea what the general contract on ServiceTracker.getService() might be? Not sure if that's a quick call or might slow down the more bundles you have. -David
