Closed mnlipp closed 1 year ago
@mnlipp this was merged: https://github.com/jakartaee/mail-api/pull/633
Can we close this?
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.
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.