Hi,

Using the iPOJO API you can use 'setFilter' to update the LDAP filter of a 
dependency (DependencyModel.setFilter). When changed the set of bound services 
is recomputed. Be aware that it may lead to an invalidation of the instance if 
no providers match the new filter. 

What we did in the past is to develop a handler receiving the new properties, 
computing the new filter and applying it to the targeted dependency.

Regards,

Clement

On 27 nov. 2012, at 11:41, Bengt Rodehav <[email protected]> wrote:

> I'm using the latest iPOJO version. I'm trying to use configuration
> properties (via config admin) to make my service wiring dynamic.
> 
> I have handler services that expose service properties (that tells the
> world what they can handle). The consumer of these services uses @Require
> with an LDAP filter to specify what needs to be handled and thus limit what
> handlers can be used.
> 
> But, I want the LDAP filter to be dynamic so that I can wire up service
> providers with service consumers by configuration properties on the
> consumers and providers.
> 
> I've tried to buld the LDAP filter dynamically (using a configurable
> property) but I get the compilation error:
> 
> *  The value for annotation attribute Requires.filter must be a constant
> expression*
> 
> I was hoping that if I changed a configuration property, iPOJO would
> refresh its list of provider services to match the changed LDAP filter.
> 
> How can I accomplish what I want? Is there a best practice?
> 
> /Bengt


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

Reply via email to