eclipse-ee4j / eclipse-ee4j/jersey

Guice Scope is LOCAL, preventing guice injection in Filter.

Open
#3,384 4 comments 0 reactions 0 assignees View on GitHub
Component: extensions Priority: Major Type: Bug
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

GuiceScopeContext visibility was set to LOCAL instead of NORMAL.

[https://github.com/hk2-project/hk2/commit/0ad31489bd8485ef152bf1e9f1a872f9d4383443](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.

Contributor guide

Open the contributing guide

Research direction

Start with the referenced commit and inspect the GuiceScopeContext visibility setting. Trace how the child service locator and injector interact with ContainerRequestFilter, especially whether LOCAL prevents dependency injection and whether NORMAL introduces the reported leak. Done means the intended visibility is established and Guice dependencies can be obtained from the filter without causing the suspected leak.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.