On Tuesday 20 March 2007 16:31, Peter Kriens wrote:
> So a bundle that uses javax.swing and does not import is a faulty
> bundle. However, it should run when the
> org.osgi.framework.bootdelegation is set to *.

Is it only me that think that it is extremely bad that the reference
implementation(!) accepts faulty bundles??
Shouldn't it at least be that the bootdelegation is default 'none'?

We can't assume that everyone will rely on tooling to get things right. I
 have now several times been involved in locating this kind of problems in
 customer bundles, and the problem will only increase with more OSGi
 adopters. I will continue to claim to customers that this is an Equinox bug.

Furthermore; Export-Package of the system bundle also seems inconclusive
between implementations. I think the specification should be very specific.
Using text "the Framework must explicitly export relevant packages from the
parent class loader" is IMHO far too vague. And also, the specification does
not mention what the default value for org.osgi.framework.system.packages
really is,and since the specification says
"All other packages available through the parent class loader must be hidden
from executing bundles."
which to me isn't very ambiguous, i.e. no automatic exposure of JDK packages,
and Equinox indeed export JDK packages by default, the only 'loop hole' that
Equinox is "exploiting" is that the org.osgi.framework.system.packages
property's default value is not defined in the spec.



Btw,
According to
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/
reference/misc/runtime-options.html

One should use the osgi.java.profile.bootdelegation property.

Both

  java -Dosgi.java.profile.bootdelegation=none \
       -jar $EQ/plugins/org.eclipse.osgi_3.3.0.v20070208.jar \
       -clean \
       -console

and

  java -Dosgi.java.profile.bootdelegation=ignore \
       -Dorg.osgi.framework.bootdelegation=""  \
       -jar $EQ/plugins/org.eclipse.osgi_3.3.0.v20070208.jar \
       -clean \
       -console

still let my bundle use the javax.swing package...


Cheers
--
Niclas Hedhman, Software Developer

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to