felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ferry Huberts <maili...@hupie.com>
Subject Re: Declarative Services
Date Thu, 20 Jun 2013 09:01:26 GMT


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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

-- 
Ferry Huberts

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message