You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The purpose of this issue is to discuss and ultimately document how ContextResolvers will be handled in Jakarta Rest after @context injection is deprecated/removed. This topic has been discussed in the rest-dev mailing list and I will attempt to add at least the latest discussion here.
The text was updated successfully, but these errors were encountered:
This is where I'm wondering if I'm missing something TBH. I looked at the TCK and through the RESTEasy tests as well as read over the 3.1 specification. I don't see where you can inject a type that a ContextResolver resolves with @context. All the examples I see inject the Providers and lookup the ContextResolver to resolve the context type. Am I missing something? I might very well be, which is why I'm asking :) FWIW I thought it would work too, but all my local testing shows the injected values to always be null.
From Santiago:
Right, I think you’re correct in your analysis, this is only done programmatically. So it boils down to having support to inject Providers. However, having a method called getContextResolver in Providers when @context is deprecated may be a bit odd —but again backward compatibility is imperative here.
Given a ContextResolver is not used to inject components, should we keep it and not deprecate it? While it is similar to a CDI producer, it's not exactly the same. You can actually filter reslovers based on a MedaType. It seems that might still be desirable and would not be possible with a CDI producer.
The purpose of this issue is to discuss and ultimately document how ContextResolvers will be handled in Jakarta Rest after @context injection is deprecated/removed. This topic has been discussed in the rest-dev mailing list and I will attempt to add at least the latest discussion here.
The text was updated successfully, but these errors were encountered: