Repository navigation
Netigso: Align OSGI framework bootdelegation with Equinox - #9756
matthiasblaesing wants to merge 1 commit into
Conversation
Apache Felix by default only uses java.* as list for bootdelegation. This differs from eclipse, which uses: javax.*, org.ietf.jgss, org.omg.*, org.w3c.*, org.xml.*, sun.*, com.sun.* At least one module (jgit) makes this assumption and the author of this commit assumes that there are more modules doing the same. Closes: apache#9751
|
target meant to be delivery, right? |
Yes indeed. What a coincidence, that the CI/CD infrastructure did not yet run the job 😃 |
There was a problem hiding this comment.
The change is OK short term, but in the long term horizon we should do better:
module (jgit) makes this assumption
- Can we sent a patch upstream to make jgit compatible with Felix and pure OSGi spec?
- Can we remove these extra packages then?
- using
Constants.FRAMEWORK_BOOTDELEGATIONis a fine workaround, but only a workaround - the core idea of OSGi is isolation and expanding the list of system packages violates the isolation
- using
- Alternatively: can we patch
jgitnow, and them fix the problem by upgrading?- attempted at #9755
| // https://github.com/eclipse-equinox/equinox/blob/7d9c3b69eae96c977f7f97add730a4d679060002/bundles/org.eclipse.osgi/JavaSE-9.profile#L244-L251 | ||
| configMap.merge( | ||
| Constants.FRAMEWORK_BOOTDELEGATION, | ||
| "javax.*, org.ietf.jgss, org.omg.*, org.w3c.*, org.xml.*, sun.*, com.sun.*", |
There was a problem hiding this comment.
- is it reasonable to export package that aren't visible by the JPMS?
- e.g.
sun.*andcom.sun.**seem to contradict the direction JDK is heading - if there is a code that really needs these packages, then OK, ...
- ...but otherwise, I'd suggest to avoid exporting these non-public JDK packages
- e.g.
- exporting
javax,org.w3c, ororg.xmlis OK - Is
org.omgstill in the JDK21+?
neilcsmith-net
left a comment
There was a problem hiding this comment.
Makes sense. Thanks for looking into this!
|
Closing in favor of #9755 (which is hopefully temporary) |
|
And maybe for future reference: Equinox does not boot delegate as described. Equinox has a fallback mechanism, that is enabled by default, that boot delegates class loads, that fail the correct OSGI code paths. That means it is muss less aggressive as normal boot delegation. Normal boot delegation overrides class loading and redirects to the JDK before the OSGI environment has a chance to load the class. |
Apache Felix by default only uses java.* as list for bootdelegation.
This differs from eclipse, which uses:
At least one module (jgit) makes this assumption and the author of this commit assumes that there are more modules doing the same.
Closes: #9751