Compendium Section 112.5.1 states: > A component must first be enabled before it can be used. A component cannot be enabled unless the > component's bundle is started. See Starting Bundles in OSGi Core Release 6. All components in a bun- > dle become disabled when the bundle is stopped.
Core Section 4.4.5 states: > Once a bundle is started, a bundle must be activated, see Activation on page 109, to give control > to the bundle so that it can initialize. Note that SCR is not required to do work in a "synchronous" way. It simply cannot do anything before the bundle has started. So you can't know that a "component is active" when the bundle is "started". You have to check the component itself because there are other factors involved in enabling a component. There's the service "org.osgi.service.component.runtime.ServiceComponentRuntime" which lets you introspect components. Now when you're talking about "remote" is it that you can't use RSA (Remote Service Admin)? Because your description is what RSA is intended to address. Sincerely, - Ray On Sun, Dec 10, 2017 at 5:55 AM, Konrad Windszus via osgi-dev < [email protected]> wrote: > And one more related question: > Is it valid to assume that once a DS component is registered, the services > which are implemented by this component are registered as well or does it > happen only afterwards? > > > On 10. Dec 2017, at 11:52, Konrad Windszus via osgi-dev < > [email protected]> wrote: > > > > 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 > > [email protected] > > https://mail.osgi.org/mailman/listinfo/osgi-dev > > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev > -- *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> (@Liferay) Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
