On 2018-04-13T09:32:30 +0100 Neil Bartlett <njbartl...@gmail.com> wrote: > > Interop already works just fine in one direction: OSGi bundles depending on > JPMS modules...
Please indulge me in a bit of brain storming... Let's assume hypothetically that the goal now is to produce an OSGi container that can use (possibly nonexistent) APIs in the JPMS to get the same degree of VM-enforced separation between OSGi bundles as JPMS modules get between each other (I'm aware that OSGi bundles get cleaner separation today than JPMS modules in some regards). Let's assume that we want to do this simply because we don't want to be left out in the cold when it comes to future language and VM features that might be module-dependent. Let's assume that, for the perspective of someone using this magic new OSGi container, the goal is to have it behave pretty much like an OSGi container already behaves (modulo the R7 java.* changes): An OSGi bundle can only depend on OSGi bundles, and if you want to be able to talk to external system JPMS modules, you have to do it via the system/framework bundle. Let's also assume that we're not interested in having JPMS modules outside of the OSGi container be capable of depending on OSGi bundles running inside the container. This is similar to the situation today; it's not too easy (or desirable) to have things on the classpath depend on things running inside the OSGi container. Let's also assume that the magic new OSGi container needs the same capabilities that existing OSGi containers already have: Module loading/unloading, multiple bundle versions without conflicts, etc, etc. I'm not sure, for the sake of discussion, whether or not the OSGi bundles in question happen to contain JPMS metadata already (such that if you took the OSGi bundle and put it on the module path, it'd behave correctly as a JPMS module). This magic new OSGi container would be much like the JPMS analogue of the existing classpath-based OSGi world: You have the classpath, and you have the OSGi container, and dependencies from one to the other have to occur through well-defined portals (the system/framework bundle). What additions to the JPMS APIs would be needed to make this a reality today? -- Mark Raynsford | http://www.io7m.com
Description: OpenPGP digital signature
_______________________________________________ OSGi Developer Mail List email@example.com https://mail.osgi.org/mailman/listinfo/osgi-dev