Hi,

Ikuo Yamasaki schrieb:
> Hi Felix
> 
> On Tue, 28 Jul 2009 14:08:13 +0200
> Felix Meschberger <[email protected]> wrote:
> 
> Felix> Hi,
> Felix> 
> Felix> Ikuo Yamasaki schrieb:
> Felix> > Dear OSGi Experts,
> Felix> > 
> Felix> > I have another question on DS.
> Felix> > 
> Felix> > In R4.2 cmpn Spec section "112.5.5 Factory Component" has the 
> following
> Felix> > sentence;
> Felix> > ----
> Felix> > The component factory, however, does not use any of the target 
> services and
> Felix> > does not bind to them.
> 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 neither enabled nor 
> 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> > enableComponent medhos of it, c1 will get enabled and 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> AFAICT this is incorrect.
> Felix> 
> Felix> Only when ComponentFactory.newInstance() is called will an instance of
> Felix> the component c1 class be created and the service r1 be bound to that
> Felix> new instance.
> 
> Oh, I miswrote the method name. (I intended to write not
> "enabledComponent" but "newInstance").

Ah, ok.

> 
> My quesion should have been :
> ----
> 
> 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 notr activated
> yet). The sentence described above is true for this case.
> 
> Socondly, when a bundle get the ComponentFactory service and calls
> newInstance method of it, instance of c1 will be created and c1 will get
> 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 ?

This is also my understanding, yes.

Regards
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
> 
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to