jersey
jersey copied to clipboard
Guice Scope is LOCAL, preventing guice injection in Filter.
GuiceScopeContext visibility was set to LOCAL instead of NORMAL.
https://github.com/hk2-project/hk2/commit/0ad31489bd8485ef152bf1e9f1a872f9d4383443
The affect of this is that i am now unable to obtain guice dependencies within ContainerRequestFilter.
Was there a reason that a NORMAL visibility caused memory leaks? Does the child service locator create a new Injector? I would imagine it was the application/module's fault if any memory leak was found.
- Issue Imported From: https://github.com/jersey/jersey/issues/3384
- Original Issue Raised By:@glassfishrobot
- Original Issue Assigned To: @mpotociar
@glassfishrobot Commented Reported by djairball
@glassfishrobot Commented This issue was imported from java.net JIRA JERSEY-3112
I believe I ran across this when trying to inject a Guice service using guice-bridge into a ContainerRequestFilter
that is registered using a DynamicFeature
.
It works just fine when using Feature
... the service fails to be located only when using DynamicFeature
.
I don't know enough about Jersey internals to know the difference between how service locators work between Feature
and DynamicFeature
.
I found this related hk2 GH ticket: https://github.com/eclipse-ee4j/glassfish-hk2/issues/31