Skip to content
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

Provide a SPI for the InjectorFactory #38

Open
gsmet opened this issue Apr 5, 2022 · 1 comment
Open

Provide a SPI for the InjectorFactory #38

gsmet opened this issue Apr 5, 2022 · 1 comment

Comments

@gsmet
Copy link

gsmet commented Apr 5, 2022

In Quarkus, we end up having a copy of the following class just to override the InjectorFactory (with QuarkusInjectorFactory):
https://github.com/resteasy/resteasy-microprofile/blob/main/rest-client-base/src/main/java/org/jboss/resteasy/microprofile/client/RestClientBuilderImpl.java#L127

I wonder if we could expose a SPI for that so that Quarkus is not forced to have the RESTEasy CDI dependency.

Note that it's going to be a pain to migrate automatically to Jakarta but... at least, it will be done and will be more future proof.

@jamezp
Copy link
Contributor

jamezp commented Apr 5, 2022

I'm thinking this is going to require using a ServiceLoader if that seems like an acceptable option. It looks like it's probably best to set the InjectorFactory early as it's used elsewhere in the ResteasyProviderFactoryImpl. I think this could be done either in RESTEasy or in RESTEasy MicroProfile. It would be somewhat of an enhancement to RESTEasy, however I could see where it's kind of a bug too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants