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

Adapt all Dependent injections in Application/Workspace scoped types #806

Open
Col-E opened this issue Jun 11, 2024 · 0 comments
Open

Adapt all Dependent injections in Application/Workspace scoped types #806

Col-E opened this issue Jun 11, 2024 · 0 comments

Comments

@Col-E
Copy link
Owner

Col-E commented Jun 11, 2024

Background: https://rmannibucau.wordpress.com/2015/03/02/cdi-and-instance-3-pitfalls-you-need-to-know/

A recent example of the problem can be found in f1da92e - Where AntiDecompilationSummarizer defines a Instance<MappingGeneratorPane>

  • The AntiDecompilationSummarizer class is ApplicationScoped
  • Generated values from the Instance<MappingGeneratorPane> were not being "destroyed" in the container, thus leading to leakage issues
  • Calling generatorPaneProvider.destroy(value) addresses the issue, but this needs to be handled in all similar cases. Something more automatic would be ideal. In our usage of dependent. If we can automatically call destroy so that the CDI won't prevent garbage collection, while still ensuring the generated beans have access to injected services that would be great. Otherwise we can probably re-create the Dependent scope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant