royteeuwen commented on PR #2330:
URL: https://github.com/apache/groovy/pull/2330#issuecomment-3634008318

   @eric-milles yes, it should become available through Service Loading **but** 
there are two issues:
   
   - Now that groovy-json is set as a Fragment, it does not work anymore, only 
Bundles in OSGi will be loaded through service loading, hence the change of 
removing the Fragment-Host property that was initially part of this PR
   - There can be a race condition, where the Bundle is still starting up and 
registering it's service loaders (which happens sort of async), but the 
groovy-json class FastStringUtils is already called, meaning that it doesn't 
find the service loader at that moment. So the code how it's written now is 
never going to work in that case because it only allows you to get the string 
service instance once. I hope this will be resolved in 
https://github.com/apache/felix-dev/pull/455 and 
https://github.com/osgi/osgi/pull/882
   
   I will check if I find some time to add test cases :) I expect it will be a 
simple test hehe. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to