felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@apache.org>
Subject Re: How to use a service immediately after its activation?
Date Thu, 20 Mar 2014 16:53:41 GMT
Hi Peter,

On Thu, Mar 20, 2014 at 4:32 PM, Peter Kriens <peter.kriens@aqute.biz> wrote:
> ...The migrator depends on the raw service and registers a delegate service after it
> migrated the database. You can easily make a pipeline like this. A simple service property
> will do the trick. In DS it is easy to use the target filter (that can be set by config
> so you code is ignorant of the fact) to manage the pipeline.
>         db -> migrator -> client

Looks very cool, I agree. But how do you hide the raw db service from
existing clients that currently get it via an @Reference annotation
with no specific filter?

My understanding is that a DS client that does not specify a filter
will get the first service that provides the corresponding interface,
so as soon as the raw db is available, those clients will see it.

I'm probably missing something...by "can be set by config admin" do
you mean that I can setup a default filter so that clients with no
filter only see the delegate service that the migrator registers,
because that delegate will have something like a visibleTo=allClients
service property?

> ...In general you make things surprisingly complex once you step outside the standard
service dependency model....

Absolutely agree, so if your suggestion works without any changes to
existing clients that's fantastic.


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

View raw message