On 20/06/13 10:44, bokie wrote:
> Hi David,
> 
> Thanks for taking the time to respond.
> 
> I'll try to illustrate the use case with a small diagram...
> 
>  ___________       ___________        ___________      ____________
> |                 |     |                 |      |  Consumer |     | (B)
> requires |
> |  Service (s) |-->|  Registry     |--> |    (a)       |----| instance (a) |
> |__________ |     |___________|     |__________|     |___________|
> 
> Summarizing the problem: 
> Assuming that (B) and Consumer (a) of Service (s) are in the same bundle,
> how "should" (B) acquire the instance (a) instantiated by the SCR?
> 

several possibilities, which depend on use-case and taste

1.
You can let the consumer register itself as a service, so that B can get
it from the registry

2.
You can use the whiteboard pattern to let the service s retrieve a/all
consumer/s from the registry. B can then do the same.

3.
You could merge B and the consumer since B always requires an (the?)
instance of consumer a

4.
... (it goes on) ...


> Thanks again,
> Jorge
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://apache-felix.18485.x6.nabble.com/Declarative-Services-tp5004036p5004044.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

-- 
Ferry Huberts

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to