On Sun, Dec 10, 2017 at 11:45 AM, Konrad Windszus <[email protected]> wrote:
> Hi Ray, > thanks for confirming. So the relation between bundle life cycle and > component lifecycle is clear now. > The only remaining question is now: > > 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? > > Can you quickly comment on that one as well? > If the component is enabled and it's references are satisfied, then its service will be published, even if it is lazy, because it is published using a service factory which instantiates the service instance only when requested. > > 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. > > Basically I need that in an IT being executed with maven-failsafe-plugin. > That IT connects to an OSGi container via HTTP. It also starts the OSGi > container beforehand. Now the only missing piece is the trigger, which > tells me that all necessary services are registered for the HTTP-based IT > to execute. > I am relying on the ReST interface being provided by the Felix Web Console > to check for bundle and component state. > I'm not familiar with what rest services are provided by webconsole, but if you can observe "services" then you should see a service reference for the component and when you see that, the component should be ready for use. However, do note that a lazy component doesn't activate until first requested... and it may fail during activation. So take note of that. Sincerely, - Ray > > Konrad > > > 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) > > > -- *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
