2
edits
Changes
no edit summary
1. Look for the service reference in the bundle context:
The Framework returns ''ServiceReference'' objects from the ''BundleContext.getServiceReference'' method.
A ''ServiceReference'' object may be shared between bundles and can be used:
1. to examine the properties of the service
2. to get the service object.
<b>ServiceReference reference = context.getServiceReference(BookFinder.class.getName());</b>
2.Look for the service object referenced by the specified ''ServiceReference'' object, namely the ''reference'' variable obtained at the first step. if (reference != null) <b> finderService = (BookFinder) context.getService(reference);</b>