Thank you for Felix and BJ. I got it.
Best regards, On Tue, 28 Jul 2009 14:53:57 +0200 Felix Meschberger <[email protected]> wrote: Felix> Hi, Felix> Felix> Ikuo Yamasaki schrieb: Felix> > Hi Felix Felix> > Felix> > On Tue, 28 Jul 2009 14:08:13 +0200 Felix> > Felix Meschberger <[email protected]> wrote: Felix> > Felix> > Felix> Hi, Felix> > Felix> Felix> > Felix> Ikuo Yamasaki schrieb: Felix> > Felix> > Dear OSGi Experts, Felix> > Felix> > Felix> > Felix> > I have another question on DS. Felix> > Felix> > Felix> > Felix> > In R4.2 cmpn Spec section "112.5.5 Factory Component" has the following Felix> > Felix> > sentence; Felix> > Felix> > ---- Felix> > Felix> > The component factory, however, does not use any of the target services and Felix> > Felix> > does not bind to them. Felix> > Felix> > ---- Felix> > Felix> > Felix> > Felix> > Let me assume that factory component "c1" has reference "r1" and Felix> > Felix> > implementation class of c1 has bind method. Felix> > Felix> > Felix> > Felix> > Firstly, when c1 gets satisfied because r1 gets satisfied, SCR will Felix> > Felix> > registers a ComponentFactory service. At that time, the bind method of Felix> > Felix> > it will not be called back (because c1 is neither enabled nor activated Felix> > Felix> > yet). The sentence described above is true for this case. Felix> > Felix> > Felix> > Felix> > Socondly, when a bundle get the ComponentFactory service and calls Felix> > Felix> > enableComponent medhos of it, c1 will get enabled and activated. Felix> > Felix> > Then the bind method of c1 sill be called back and, c1 can locate Felix> > Felix> > the bound service in the bind method . (it is up to the impl of c1). Felix> > Felix> > Felix> > Felix> > Is my understanding correct ? Felix> > Felix> Felix> > Felix> AFAICT this is incorrect. Felix> > Felix> Felix> > Felix> Only when ComponentFactory.newInstance() is called will an instance of Felix> > Felix> the component c1 class be created and the service r1 be bound to that Felix> > Felix> new instance. Felix> > Felix> > Oh, I miswrote the method name. (I intended to write not Felix> > "enabledComponent" but "newInstance"). Felix> Felix> Ah, ok. Felix> Felix> > Felix> > My quesion should have been : Felix> > ---- Felix> > Felix> > Let me assume that factory component "c1" has reference "r1" and Felix> > implementation class of c1 has bind method. Felix> > Felix> > Firstly, when c1 gets satisfied because r1 gets satisfied, SCR will Felix> > registers a ComponentFactory service. At that time, the bind method of Felix> > it will not be called back (because c1 is notr activated Felix> > yet). The sentence described above is true for this case. Felix> > Felix> > Socondly, when a bundle get the ComponentFactory service and calls Felix> > newInstance method of it, instance of c1 will be created and c1 will get Felix> > activated. Felix> > Then the bind method of c1 sill be called back and, c1 can locate Felix> > the bound service in the bind method . (it is up to the impl of c1). Felix> > Felix> > Is my understanding correct ? Felix> Felix> This is also my understanding, yes. Felix> Felix> Regards Felix> Felix Felix> Felix> > Felix> > Felix> > --------------------- Felix> > NTT Cyber Solutions Laboratories Felix> > Felix> > Ikuo YAMASAKI Felix> > E-mail: [email protected] Felix> > TEL +81-46-859-8537 FAX +81-46-855-1282 Felix> > Felix> > Felix> > _______________________________________________ Felix> > OSGi Developer Mail List Felix> > [email protected] Felix> > https://mail.osgi.org/mailman/listinfo/osgi-dev Felix> > Felix> _______________________________________________ Felix> OSGi Developer Mail List Felix> [email protected] Felix> https://mail.osgi.org/mailman/listinfo/osgi-dev Felix> --------------------- NTT Cyber Solutions Laboratories Ikuo YAMASAKI E-mail: [email protected] TEL +81-46-859-8537 FAX +81-46-855-1282 _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
