-
Notifications
You must be signed in to change notification settings - Fork 62
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
microprofile-health-128 org.eclipse.microprofile.health.HealthCheckResponse leaks #264
Conversation
Hi @rmannibucau, could you check if this PR meet your concern in #128 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api/src/test/resources/META-INF/services/dummy should probably be removed. At least I missed its use.
api/src/main/java/org/eclipse/microprofile/health/HealthCheckResponseProviderResolver.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/eclipse/microprofile/health/HealthCheckResponseProviderResolver.java
Show resolved
Hide resolved
api/src/main/java/org/eclipse/microprofile/health/SecurityActions.java
Outdated
Show resolved
Hide resolved
Hi @antoinesd , from my understanding it just moves the issue somewhere else (basically while there is a setter, with or without a filter the issue remains). A clean solution is likely to make the factory (builder) an injectable bean which would therefore fully inherit CDI context definition in next major. Until then keeping current solution sounds like acceptable. |
@rmannibucau the proposed solution allows the usage of multiple implementations even impl provided in app as your mentioned in ticket #128, so I really don't get your issue. As we won't drop the service loader usage I don't see how your suggestion could be viable. |
…sponse leaks fixes eclipse#128 with multiple providers support addition Signed-off-by: Antoine Sabot-Durand <antoine@sabot-durand.net>
3680d05
to
467cf6b
Compare
@antoinesd the PR still leaks the impl (the provider and the predicate) and is still not aligned on the CDI container lifecycle (which is this ticket). Why serviceloader wouldn't be dropped? There is no technical reason to duplicate the impl loading. |
Sorry Romain, there is no mention of CDI in the initial ticket. The use case you mentioned in it was to support multiple impl (even one included in the app) which is now the case. |
@antoinesd hmm I didn't write "CDI" but that the builder should be "injected", sorry if it was not explicit enough. |
Obviously, I totally missed your point and I'm not quite sure to understand what you suggest. As most MP are using ServiceLoader, I guess that the problem you raise is at the platform level and should be discussed in the MP mailing list. |
@antoinesd oki, agree it can be tackled at platform level too. What I hit was the leak between containers instances (recreating classloaders i switched of provider unintentionally in a complex setup) but the underlying issue is really the fact to not align properly on CDI using ServiceLoader (or alike) API in specs. |
fixes #128 with multiple providers support addition
Tests also added to api to make sure multiple provider resolution works as expected