-
Notifications
You must be signed in to change notification settings - Fork 256
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 Framework must not recursively call ServiceFactory::GetService and ServiceFactory::UngetService on the same thread for the same bundle #213
Comments
Sascha described in #202 how this behavior could happen:
Test code needs to be written to trigger this behavior and verify the implementation fixes the issue. |
I am reading paragraph 10.1.25.1 of the OSGi Core 6.0 specs about service factories. The specified error handling is not in line with our code in |
That all sounds good to me. I noticed that code coverage for the It does beg the question on whether we should implement the Also, I think that the work to convert over to consistently using |
Good points. I think we should implement BundleException and use it consistently, ideally in 3.x in a backwards compatible manner. I am going to create new issues. |
I agree on using BundleExceptions consistently and in a backwards compatible way for 3.x. Thanks! |
The implementation in #222 makes use of a thread-local variable. Segmentation faults of tests from builds based on MingGW revealed a problem with the TLS implementation in libwinpthreads, which is also noted here: https://github.com/Alexpux/MINGW-packages/issues/2519 Therefore, the checks for recursive service factory calls are going to be disabled for MinGW platforms until this is resolved. |
According to the OSGi spec for a ServiceFactory, the
getService(Bundle bundle,ServiceRegistration<S> registration)
method states:The Framework currently doesn't enforce this. This issue is to track the implementation of this constraint.
The text was updated successfully, but these errors were encountered: