felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: Lookup strategy using maven-scr-plugin
Date Wed, 19 Nov 2008 13:55:35 GMT
Hi Thijs,

Thijs Metsch schrieb:
> Hi,
> 
> If I wanted to use a lookup strategy to access my service; does
> maven-scr-plugin support this? And how?

Well, the scr plugin currently requires bind and unbind methods. Thus
the pure lookup strategy without using bind and unbind methods is not
currently supported.

Of course you can still opt to ignore any call to the bind and unbind
method and instead use the ComponentContext to lookup the reference on
demand. But, I agree, that this definitely clutters the class and adds
some overhead without any real need.

I could imagine, that we add an attribute to the @scr.reference tag:

    strategy = event | lookup

The default value would be "event". If the strategy attribute is set to
"lookup", no bind and unbind methods are required (and generated) and no
bind/unbind configuration attributes are set. Otherwise the bind and
unbind methods are required (and generated) and the bind/unbind
configuration attributes are set.

WDYT ?

Regards
Felix

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


Mime
View raw message