> 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. > ----
The point of that sentence is that the ComponentFactory service registered by DS does, itself, not use any of the referenced services. > > 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. c1 must be enabled to get this far. There are no component configurations of c1 until newInstance is called on the ComponentFactory. > > Socondly, when a bundle get the ComponentFactory service and calls > enableComponent medhos of it, c1 will get enabled and activated. There is no enableComponent method on the ComponentFactory interface. > 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). When ComponentFactory.newInstance is called, a new component configuration is created which is then activated including binding referenced services. > > Is my understanding correct ? > > # 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. > -- BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance [email protected] office: +1 386 848 1781 mobile: +1 386 848 3788
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
