Hi, Ikuo Yamasaki schrieb: > Dear OSGi Experts, > > I have another question on DS. > > In R4.2 cmpn Spec section "112.5.5 Factory Component" has the following > sentence; > ---- > The component factory, however, does not use any of the target services and > does not bind to them. > ---- > > Let me assume that factory component "c1" has reference "r1" and > implementation class of c1 has bind method. > > Firstly, when c1 gets satisfied because r1 gets satisfied, SCR will > registers a ComponentFactory service. At that time, the bind method of > it will not be called back (because c1 is neither enabled nor activated > yet). The sentence described above is true for this case. > > Socondly, when a bundle get the ComponentFactory service and calls > enableComponent medhos of it, c1 will get enabled and activated. > Then the bind method of c1 sill be called back and, c1 can locate > the bound service in the bind method . (it is up to the impl of c1). > > Is my understanding correct ?
AFAICT this is incorrect. Only when ComponentFactory.newInstance() is called will an instance of the component c1 class be created and the service r1 be bound to that new instance. Regards Felix > > # I don't mean the spec is no clear. I think the sentense says > # not "CANNOT" but "deos not". I would like to know if my understanding > # correct. > > Best regards, > > --------------------- > 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 > _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
