-
Notifications
You must be signed in to change notification settings - Fork 4
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
OSGi bundles and proxy identity - allow more than once service proxy to utilise a specific bundle version? #150
Comments
Item 3. I think it would be easiest to use preferred class loading to load AtoimcInvocationHandler into the BundleDelegatingClassLoader. However this presents a problem with BasicJeriTrustVerifier. Perhaps we should inject a token into AtomicInvocationHandler instead, that is loaded by the BundleDelegationClassLoader, to ensure that a ProtectionDomain representing the service is present on the call stack, then we need to invoke a method on the token every time that InvocationHandler::invoke is called. This could of course be in-lined as a no-op, this needs further investigation. The problem with the token approach is that permissions are granted by the client during proxy preparation to the ClassLoader of the smart proxy. The BundleDelegatingClassLoader, although the ClassLoader of the Endpoint, is not the actual ClassLoader used to load Bundle classes. Further complicating the situation, any dependencies that are resolved for the proxy, may not have required permissions. Should we consider allowing smart proxies to share Bundles? What are the consequences? |
Example: different lookup services would share static fields: |
Is this an option?
In an answer no, while it would work, it's a hack. |
Investigate OSGi subsystems or OSGi Framework Bundle Collision Hook Service. My current thinking is we need to consider Apache Aries OSGi subsystems. |
…to utilise a specific bundle version? #150
OSGi bundles and proxy identity - allow more than once service proxy to utilise a specific bundle version? #150
…to utilise a specific bundle version? #150
…to utilise a specific bundle version? #150
…to utilise a specific bundle version? #150
Describe the bug
Currently ProxyBundleProvider doesn't allow more than one services to use a specific proxy bundle version, currently this represents a major restriction placed on the use of OSGi services.
The reason this occurs is a mismatch between OSGi bundle loading and service proxy identity.
There is a many to one relationship between proxy identity and bundles. OSGi doesn't allow loading duplicate bundles.
Options and thoughts on how to handle this, all suggestions are welcome:
The text was updated successfully, but these errors were encountered: