OSGi defined framework extension bundles
and bundles which provide equinox adaptor hooks are very similar in concept.
- Both are fragments to the system.bundle
- Both add classes to the framework's
But they have one big difference. Equinox
adaptor hook fragments must be on the framework's classloader classpath
*before* the framework is launched because they can provide implementations
to hooks which must be present from the very beginning of the Framework.
In order to do this the equinox boot strap launcher (org.eclipse.equinox.launcher
in 3.3) must discover and place each adaptor hook fragment on the classpath
of the framework before the framework is launched. The osgi.framework.extensions
configuration property is used to specify which adaptor hook fragments
the launcher searches for. The launcher does not have the smarts
to parse bundle manifests (including Bundle-ClassPath) or extract out inner
jars for the purposes of class loading. A simplifying assumption
is made that the adaptor hook fragment is a simple jar'ed bundle that can
be placed directly on the classpath.
The Bundle-ClassPath header should be
supported for "normal" framework extension bundles as defined
by OSGi. At runtime the Equinox framework has the know-how to parse
this header and extract the inner jars that need to be added to the framework's
<jvolkman@xxxxxxxxx> Sent by: equinox-dev-bounces@xxxxxxxxxxx
06/12/2007 07:33 AM
Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
"Equinox development mailing list"
[equinox-dev] Should framework extension
bundles support embedded JAR files?
We have a provisioning/updating bundle that takes care of deploying
our system into different instances. This bundle is core to the system
and should never be stopped or uninstalled. I stumbled upon framework
extension bundles yesterday and thought it would be interesting if we
could attach our provisioning bundle to the Equinox framework using an
Unfortunately, I realized that extension bundles apparently don't
support embedded jars (NoClassDefFoundErrors). Looking at section 3.15
of the core spec ("Extension Bundles"), I wasn't able to determine
whether they should be supported or not. However, if they aren't
supported, I would expect the list of illegal manifest headers to
include "Bundle-ClassPath" or at least a note detailing that
header isn't fully supported.
equinox-dev mailing list