Posted by mandychung
on April 28, 2008 at 10:38 PM PDT
A draft specification for supporting OSGi bundles in the Java Module System is made available to the JSR 277 Expert Group to continue the OSGi interoperability discussion.
A draft specification for supporting OSGi bundles in the Java Module System is put together based on the past EG discussion in particular the proposals and inputs from Glyn Normington, Richard Hall, and Bryan Atsatt. It is expected to evolve based on further inputs from the JSR 277 Expert Group.
With the OSGi expertise from the JSR 277 EG and their contributions, we expect that this specification can be finalized soon. Your feedback is welcome and please send them to firstname.lastname@example.org .
Just to highlight a few main points:
1. One or more module system implementations can run on a single Java virtual machine (e.g. JAM module system and OSGi module system).
2. A Java module can import an OSGi bundle.
3. OSGi bundles are exposed as ModuleDefinitions in the Java Module System.
4. Other module system can find OSGi bundles via the repository delegation model.
5. OSGi bundles are resolved by the OSGi module system using its own algorithm.
One thing noteworthy:
JSR 277 defines the framework and API for the Java Module System and also defines the JAM module system as the default module system implementation for the Java SE platform and the JAM file format as its distribution format.
JSR 277 Early Draft (EDR2) is being updated to clearly separate the distinction between the Java Module System framework and the JAM module system implementation.
We recognized the issue with the JSR 277 EDR that didn't clearly separate the framework/abstraction from the JAM module system implementation that led to confusion and also skeptic about the OSGi interoperability support. Bryan Atsatt also identified and raised this concern to the EG. We hope that the EDR2 will be available in a few weeks after JavaOne. In the mean time, the draft spec includes some spec clarification relevant for this support.
In addition, Bryan has a nice blog about JSR 277 interoperation that serves very well to set up the context ready for the coming discussion (thanks Bryan). I'd also like to blog more about this work but probably after JavaOne when I get some time.