If you have an unknown number of services how, conceptually, can you know when 
all of them are registered?  You claim you don't know how many there are.  
Please clarify what you are trying to do.

If you actually do know which services a client needs then the simplest 
solution is to make the client a DS component with mandatory references to the 
services it needs.  When the client shows up, you can be sure all the services 
it needs are available.

Not sure I'm understanding your problem….
david jencks

On Aug 28, 2013, at 12:36 AM, Roland <[email protected]> wrote:

> Hello Felix/OSGi-experts!
> 
> I have a *unknown* number of DS defined in fragmented bundles. Each DS
> implements an object-factory which is used to create objects of a
> JSON-configuration.
> Sometimes it happens that the SCR registers a DS to late from the
> perspective of the client. Thus, I have to synchronize and wait until all
> declarative services are registered. How can I do that?
> 
> My first idea was that it may exist an event that is triggered if the SCR
> has just completed its work. But I've never found anything in the code.
> My second idea was that I could search for service-components in each
> fragmented bundle of a particular host and compare them with the registered
> services. But this is very time consuming and the proceeding is similar to
> the SCR. So, why not using the SCR?
> My third idea was that I could wait until a particular service is regisered
> (ServiceTracker). But, this is very time consuming because in the worst case
> I have to wait until the timeout expires for each DS. And I also want to
> keep the system stupid.
> 
> What else can I do?
> 
> Thanks & Regards
> Roland
> 
> 
> 
> --
> View this message in context: 
> http://apache-felix.18485.x6.nabble.com/How-To-Wait-until-all-DS-are-registered-tp5004727.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]
> 


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

Reply via email to