-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject Client via CDI #749
Comments
In line with our roadmap we should cover this in JAX-RS 3.0. |
Is this something we could start working on or we should wait 'till 2.2 is out? |
@jeyvison Great to have you on board! Please find the roadmap in our wiki. CDI will be part of JAX-RS 3.0, which is rather far away. So if you start working on that, it could happen that you need to fix git conflicts from time to time. If you don't fear that, have fun coding! :-) |
Could you please foresee in the spec all the extension/configuration points needed by a standalone client (not deployed in a EE container) to use CDI-SE? |
I think we could cover that with JAX-RS 3.0. JAX-RS 2.x does not regulate CDI SE. |
It would be a nice addition if the JAX-RS
Client
type can be injected via@Inject
(see #569, #60, #639) which results in the same result asClientBuilder.newClient()
. However, by doing so we facilitate to mock the JAX-RS client out of classes in test scopes.Additionally, the
ClientBuilder
could also be injectable, if users want to use injection with further configuration and still enable the implementation to be mocked. The issue with having client calls in test scopes is that the staticClientBuilder.newBuilder()
attempts to load via SPI and is hard to mock (being static).Example for the second suggestion:
The text was updated successfully, but these errors were encountered: