The smart thing to do is to wait for the component's service to be registered. This means that the component's dependencies are satisfied. The component's bundle being active is just one such dependency but there can be others. --
BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance hargr...@us.ibm.com office: +1 386 848 1781 mobile: +1 386 848 3788 From: Konrad Windszus via osgi-dev <osgi-dev@mail.osgi.org> To: OSGi Developer Mail List <osgi-dev@mail.osgi.org> Date: 2017/12/10 05:53 Subject: [osgi-dev] Component Life Cycle: When are DS components/services registered Sent by: osgi-dev-boun...@mail.osgi.org Hi, I have a question about the component life cycle of DS components and the relation to the containing bundle's life cycle. According to OSGi Comp R6, 112.5.1 "the life cycle of a component is contained within the life cycle of its bundle". But is it a valid assumption that all enabled components are registered before the containing bundle becomes active? Is the same true for services? Or does the registration of the services/components only happen after the bundle has switched to state active? The life cycle example at 112.5.17 unfortunately is also very vague in that regard as it only talks about "bundle started" event. I need to know this information in the context of executing an IT against a remote OSGi container. The IT should only start to execute, once a particular (lazy) component is registered. Is it enough to wait for the Bundle status "Active", or do I really have to check the status of this particular component? Thanks in advance, Konrad _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.osgi.org_mailman_listinfo_osgi-2Ddev&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=p-HkGsKTJWWSiO-pz0kKXl8ALzmlqvUGeFfgHUZX8ms&m=LP_CgrFm7Moxaw6UGi9rM-O_ASVG1ky4ynvk0Y18GMI&s=KLEf2yFvPZpVv68jjRkzpnfqYUyWoWfbFX0OUP1QUCs&e=
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev