The OSGi enterprise specification defines two ways of tracking: by service or by bundle.
What are the differences between these two ways? In which cases, one way should be used over another?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends on what you are willing to track.
The BundleTracker tracks bundles, see:
And the ServiceTracker tracks service instances, see:
So obviously if you are interested in what happens with bundles, you use the BundleTracker. And if you are interested in service instances, you use the ServiceTracker.