-
1. Registering services with other bundles
thomas.diesler Apr 5, 2011 7:16 AM (in response to bosschaert)Hi David,
your change affects both service registration and lookup.
BundleContext.getServiceReferences(...) says
- For each class name with which the service was registered, calling
ServiceReference.isAssignableTo(Bundle, String)
with the context bundle and the class name on the service'sServiceReference
object must returntrue
Unless I'm mistaken, the returned set of srefs is not filtered any more because you shortcut the bundle classloader. This should show up as TCK regression, does it not? Perhaps there need to be two code paths. One for registration, one for lookup.
From BJ's comment I take that a bundle may register a service regardless of whether it can obtain a reference to the same service using BundleContext.getServicesReferences().
Could you please extends your test to verify that the isAssignableTo filter still works?
- For each class name with which the service was registered, calling
-
2. Registering services with other bundles
bosschaert Apr 7, 2011 5:40 PM (in response to thomas.diesler)Thanks for the suggestion, Thomas. Although the TCK was passing the ServiceReference.isAssignableTo() didn't do what it was supposed to do.
I've updated it and added more tests around this area. The TCK is green too.
See here for the additions (which are on my jbosgi-438 branch): https://github.com/bosschaert/jbosgi-framework/commit/eb4686fe86f0281cd689c071d5c40c2f18ee1cd2
-
3. Registering services with other bundles
bosschaert Apr 12, 2011 11:13 AM (in response to bosschaert)I've rebased the changes for JBOSGI-438 off the latest tag in jbosgi-framework: 1.0.0.Alpha23
It's here: https://github.com/bosschaert/jbosgi-framework/commits/jbosgi438_off_alpha23