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

The hk2 service loader is not used everywhere (where necessary) #635

Closed
mnlipp opened this issue Nov 2, 2022 · 2 comments · Fixed by #679
Closed

The hk2 service loader is not used everywhere (where necessary) #635

mnlipp opened this issue Nov 2, 2022 · 2 comments · Fixed by #679

Comments

@mnlipp
Copy link
Contributor

mnlipp commented Nov 2, 2022

Describe the bug

Currently, the hk2 service locator is used in FactoryFinder only. Session.java uses the ServiceLoader without the hk2 "wrapper" and therefore fails to load the providers in an OSGi environment.

@mnlipp mnlipp mentioned this issue Nov 2, 2022
@jbescos
Copy link
Member

jbescos commented Nov 8, 2022

@mnlipp this was merged: #633

Can we close this?

@mnlipp
Copy link
Contributor Author

mnlipp commented Nov 8, 2022

Can we close this?

No. #633 was about introducing the OSGi service mediator. Now, if you don't have this in place, the fallback is to use the hk2 service locator. Hk2 requires special coding for looking up the services. This special coding is currently only provided in FactoryFinder. It's missing in Session.java. Therefore providers are not found in an OSGi environment.

lukasj added a commit to lukasj/mail-api that referenced this issue Apr 29, 2023
…necessary)

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
lukasj added a commit to lukasj/mail-api that referenced this issue Apr 29, 2023
…necessary)

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
lukasj added a commit that referenced this issue Apr 29, 2023
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants