<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi Rok,<div><br class="webkit-block-placeholder"></div><div>This is another interesting paper.</div><div><br class="webkit-block-placeholder"></div><div>Regarding the import rules which you describe as unintuitive, it's worth noting that OSGi chooses the opposite solution to yours. As described in section 3.8.4 of the OSGi R4 Core Specification, the search order is as follows (in summary):</div><div><br class="webkit-block-placeholder"></div><div>1) The parent classloader in the case of java.* or any package included in the "boot delegation" package list.</div><div>2) Packages imported using Import-Package or Require-Bundle (i.e. dependencies of the bundle in question)</div><div>3) The bundle's internal classpath</div><div>4) "Dynamically" imported packages (this mechanism exists primarily to support certain types of "legacy" code)</div><div><br class="webkit-block-placeholder"></div><div>In your solution, steps (2) and (3) are switched. OSGi chooses this ordering for the purposes of class space consistency, for example it is considered good practice for a bundle that exports package 'com.foo' to also import 'com.foo', enabling other bundles to provide an alternative implementation. The following blog post explains the reasoning for this better than I am able to:</div><div><br class="webkit-block-placeholder"></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><span class="Apple-tab-span" style="white-space:pre">        </span><a href="http://www.osgi.org/blog/2007/04/importance-of-exporting-nd-importing.html">http://www.osgi.org/blog/2007/04/importance-of-exporting-nd-importing.html</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I wonder if intuitiveness is necessarily the best criterion for choosing the correct class search strategy?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Kind regards,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Neil</div> </div><div><br class="webkit-block-placeholder"></div><div>PS I note that you have removed the incorrect information about OSGi from your earlier paper -- many thanks for that.</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><div><div>On 3 Sep 2007, at 18:18, Rok Strnisa wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Dear all,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">At University of Cambridge, we have written, formalized and <span class="Apple-converted-space"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">prototyped a proposal for improvement of the Java Module System <span class="Apple-converted-space"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(JAM). The main document describing our work can be found here:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space"> </span><a href="http://www.cl.cam.ac.uk/~rs456/iJAM/iJAM_doc.pdf">http://www.cl.cam.ac.uk/~rs456/iJAM/iJAM_doc.pdf</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The other documents, including the implementation and the <span class="Apple-converted-space"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">formalization, can be found on the project's website:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space"> </span><a href="http://www.cl.cam.ac.uk/~rs456/iJAM/">http://www.cl.cam.ac.uk/~rs456/iJAM/</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Comments and suggestions very welcome.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Sincerely,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Rok Strnisa</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">modules-dev mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:modules-dev@openjdk.java.net">modules-dev@openjdk.java.net</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://mail.openjdk.java.net/mailman/listinfo/modules-dev">http://mail.openjdk.java.net/mailman/listinfo/modules-dev</a></div> </blockquote></div><br></div></body></html>