Hi Team,

To provide simple to powerfull ways to use Seam Social, I have 2 solutions to inject the same Bean

    @Inject
    Twitter twitter;

and
    @Inject
    @RelatedTo(Service.Twitter)
    OAuthService twitter; 

At the end "twitter" contains an instance of TwitterScribe bean in the 2 cases.

To achieve that I have to create a producer like this :

    @Produces
    @RelatedTo(Service.Twitter)
    protected OAuthService qualifiedTwitterProducer(@New TwitterScribe service) {
        return service;
    }

in addition of TwitterScribe bean which has the @Default qualifier.

As I'll have to do that for each service and people extending the API will also have to provide this straightforward producer for their own service bean, I was wondering if there wasn't a more elegant (generic ?) way to create a bean responding to @default and another qualifier the same way.

thanks for your feedback on that.


Antoine