-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix providers not auto registered for JAX-RS Client #11448
Conversation
Happened to see this, and I'm not sure how this fix works. A change has been made in |
Hi @kenfinnigan Common is used here: quarkus/extensions/rest-client/runtime/pom.xml Lines 26 to 29 in 193ebe2
The issue only occurs with the programmatic REST Client |
The proposal is to use the same solution that was used in Quartz: To have a config that force starts the server. The programmatic REST Client does work without the RESTEasy server, is just doesn't auto register scanned metadata like |
@radcortez Yes That's why I wasn't sure if the change actually worked when just using REST Client with no JAX-RS endpoints |
Hum, maybe you are right. The dependency is there, but as test in the extension. Let me try it out with a real project. |
Found an easier way to do it. Plus, I believe we could probably get rid of this: |
@@ -69,6 +69,7 @@ public InjectorFactory getInjectorFactory() { | |||
} | |||
|
|||
RestClientBuilderImpl.setProviderFactory(clientProviderFactory); | |||
ResteasyProviderFactory.setInstance(clientProviderFactory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't conflict with the server behavior when both are used? /cc @kenfinnigan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. When the server starts (if any) it will replace the instance:
And it will work for both server and client with the right factory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the ResteasyDeploymentImpl
used in Quarkus, for some reason I'm thinking it isn't, but could easily be wrong?
If we do use it, then I think it should work fine. But certainly worth verifying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Famous Last Words™
@kenfinnigan could you approve it if everything is good for you? Thanks! |
Fixes #11424