collado-mike commented on PR #493:
URL: https://github.com/apache/polaris/pull/493#issuecomment-2518349223
> I agree that @Named has some shortcomings.
> One of them is that the name is application-wide, so you cannot have two
beans named @Named("default").
@adutra I haven't seen this behavior during testing. E.g., the
`DefaultOAuth2ApiService` and the `DefaultContextResolver` are both named
"default", but the application doesn't seem to have any problem starting up
both instances. Could it be that we never use `@Named` as a qualifier at the
injection point? From the article you shared, it seems like the issue is one of
ambiguity at injection time if the qualifiers aren't specific. But the goal of
the `@Named` annotation in this PR is to allow named instances to be specified
in the configuration. We never use the `@Named` qualifier at the injection
points (and I don't think we should, as it defeats the purpose of the user
configuration).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]