Hi Jukka, Am Freitag, den 18.01.2008, 16:03 +0200 schrieb Jukka Zitting: > Hi, > > On Jan 18, 2008 3:57 PM, Bertrand Delacretaz <[EMAIL PROTECTED]> wrote: > > I remember talks in Jackrabbit about where to put those naming/etc. > > classes, so maybe they shouldn't really be in SPI - but the bundle > > didn't work for me without that. > > Yes, jackrabbit-spi-commons is a required dependency of > jackrabbit-core. All the internal Name and Path handling is done using > functionality from spi-commons.
Sure. So we would pack the packages with the bundle containing the embedded jackrabbit and have these packages private to this bundle. My question was directed at the API/Commons bundle containing the SPI classes, which kind of worried me, but as they are "internal" to the bundle, I do not have any further issues. > > I don't know OSGi enough to understand why such internal packages need > to be explicitly declared. The point is that when creating the bundle (or jar file) we declare the contents of the file and we have a lot of control in this. For example we can add packages from dependencies etc. For bundles to interoperate and share classes, this share has to made explicit by importing and exporting packages. This allows fine grained control of what is visible outside of a bundle. My favourite example here is JDOM: If a bundle requires JDOM 0.5 it may include this in the bundle, without exporting it. Anohter bundle may use JDOM 0.9 without any problems. The use of the given JDOM version in another is completely unknown to any bundles - as long as the packages are not exported. This is a great feature of OSGi and helps solving a lot of versioning problems. Hope this helps. Regards Felix