Thanks for the wise advice... Except that I have the distinct feeling that the OSGi environment is not fully understood, I think the outline of "3 parts" might be what we need. But before that, IF you are modeling "execution environment" (as it is called in OSGi) explicitly, which is fine although not particularly common, this is no different from modeling this explicitly for Java SE either, since JDK 1.5, 1.6 and 1.7 are exactly that (by the EE definition in OSGi at least). I don't know if you can fool a JDK1.6 compiler to use JDK1.5 library + generate 5.0 byte codes (I would like that, since there are bugs in the 1.5 generics compiler) but the general approach would be the same as for CLDC, CDC, Android and GWT EEs as well. Worth thinking about, now when you have mentioned it, but it is NOT an OSGi-specific concern, even though it would cover OSGi case as well, since the bundle is allowed to declare "Minimum Execution Environment" and the container will not start the bundle if it can't provide it. And just to be clear; The EE of a container is almost always predefined and not user manipulated, common ones being equivalent to CDC and JRE1.x. Users who tries to 'extend' these are quickly out in deep waters...
The concept that the 'container' exposes something to the bundle does not exist in default OSGi (bootstrap classloader exposure is an exception rather than the rule). IF my bundle needs org.w3c.xml package, my bundle is required to Import-Package:org.w3c.xml. It is not available, just because it is part of the JRE I am running. Only the java.* packages are. This is important to understand. And the "requirements" declared by the bundle is called the Manifest.MF, and can be shared with the Java SE Jar in most cases. There is an internal classpath within the bundle, a.k.a Bundle-ClassPath which is normally '.', i.e. the root of the Jar. But the discussion around WAB (Web Application Bundle) is that this feature allows WABs to be compatible with WARs, i.e. deployable in either environments. Both these 'overlaps' should in my opinion be leveraged. Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/3xugrbk I work here; http://tinyurl.com/24svnvk I relax here; http://tinyurl.com/2cgsug --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
