-
Notifications
You must be signed in to change notification settings - Fork 2.4k
HK2 binder registered in Feature is ignored #3675
Comments
Added test that shows the issue. |
Because providers registered in `Feature`s were not considered, registering a HK2 binder in a `Feature` didn't work. This fixes javaee#3675.
Hi Do you have any estimates on this issue? It prevents our project to migrate to 2.26. Thanks. |
Hi I tried to reproduce your use case and it worked only if I use Feaure + Binder(org.glassfish.jersey.internal.inject.AbstractBinder) |
@sergey-morenets I don't seem to be able to replicate your results, i.e. I can see the Jersey binder working properly! I've just updated my test to include the following use cases:
It may very well be that you are hitting some other issue or there is something else in your test. |
Hi, |
Description
Given the major breaking change around Jersey DI, I have spent some time today in the attempt to migrate a simple web app based on Jersey 2.25.1 to Jersey 2.26.
The web app contains a
ResourceConfig
which registers:org.glassfish.hk2.utilities.binding.AbstractBinder
;javax.ws.rs.core.Feature
which, in turn, registers anotherorg.glassfish.hk2.utilities.binding.AbstractBinder
.Since I'm heavily relying on HK2-specific annotations, I tried to add
jersey-hk2
as a dependency of the web app but the following came out:configure
method is invoked during startup);configure
method is not invoked during startup).If I replace
org.glassfish.hk2.utilities.binding.AbstractBinder
withorg.glassfish.jersey.internal.inject
in 2, also that binder is properly configured.I guess (and hope) that depending on
jersey-hk2
should be sufficient to consistently register HK2 binders either directly on aResourceConfig
and indirectly throughFeature
s.Test
The text was updated successfully, but these errors were encountered: