tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Kemnade <jochen.kemn...@eddyson.de>
Subject Re: [jira] [Created] (TAP5-2491) Default marker annotation
Date Mon, 31 Aug 2015 06:53:32 GMT

I'm not sure if this is a good idea.

Am 28.08.2015 um 17:07 schrieb Thiago H de Paula Figueiredo:
>  when more than one service matches the
> requested service, but only one of them has the @Primary annotation from
> tapestry5-annotations, return it.

If the registry contains multiple implementations of the same interface, 
there's usually a reason for it and the developer should need to think 
about which implementation is to be injected where. Also, it makes the 
code easier to understand if there is an explicit marker annotation 
along with @Inject.
It should however be possible to override ServiceInjectionProvider with 
an implementation that behaves like that.

> What do you guys think? It would be helpful specially for objects
> contributed to a service configuration and you want them to be services
> by themselves.

Isn't @Local usually sufficient for that use case?


> On Tue, 25 Aug 2015 10:15:45 -0300, Nathan Quirynen (JIRA)
> <jira@apache.org> wrote:
>> Nathan Quirynen created TAP5-2491:
>> -------------------------------------
>>              Summary: Default marker annotation
>>                  Key: TAP5-2491
>>                  URL: https://issues.apache.org/jira/browse/TAP5-2491
>>              Project: Tapestry 5
>>           Issue Type: Improvement
>>           Components: tapestry-core
>>     Affects Versions: 5.3.7
>>             Reporter: Nathan Quirynen
>>             Priority: Minor
>> It would be nice when making use of Marker annotations for tagging a
>> service, that a default marker value could be defined. So when no
>> marker annotation is added to the injection of the service this
>> defined default will be used.
>> --
>> This message was sent by Atlassian JIRA
>> (v6.3.4#6332)

To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org

View raw message