I think it's Knopflerfish which is at fault. With my little experiment
that I had while writing the email, I had found that both Felix and
Equinox actually reexport all the exported packages of the imported
bundle, where as Knopflerfish does not. I was a bit surprised, because
Knopflerfish was R4 compliant. That created a doubt in my mind, hence I
asked in the forum. Does anyone know if the R4 TCK cover this scenario?
Thanks,
Sahoo
王洪伟 wrote:
Yes, it is right I think so.
Some codes come from the equinox project as belows,
[code]
...
// now look for exports from the required bundle.
BundleSpecification[] requiredBundles = requiredBundle.getRequiredBundles
();
for (int i = 0; i < requiredBundles.length; i++) {
if (requiredBundles[i].getSupplier() == null)
continue;
if (requiredBundles[i].isExported()) {
// looking for a specific package and that package is exported by this
bundle or adding all packages from a reexported bundle
getPackages((BundleDescription) requiredBundles[i].getSupplier(),
symbolicName, importList, orderedPkgList, pkgSet, visited, strict, pkgNames,
options);
} else if (exportNames.size() > 0) {
// adding any exports from required bundles which we also export
Set tmpVisited = new HashSet();
getPackages((BundleDescription) requiredBundles[i].getSupplier(),
symbolicName, importList, orderedPkgList, pkgSet, tmpVisited, strict,
exportNames, options);
}
}
...
[/code]
2008/3/31, Richard S. Hall <[EMAIL PROTECTED]>:
Sahoo wrote:
Subject:
Need help on visibility:=reexport
From:
Sahoo <[EMAIL PROTECTED]>
Date:
Mon, 17 Mar 2008 18:48:57 +0530
To:
[email protected]
To:
[email protected]
When a bundle uses Require-Bundle along with visibility:=reexport,
does it not automatically re-export all the exported packages of the
required bundle? I hope I don't have to explicitly mention the list of
packages of the required bundles in order to make them available via
the requiring bundle. To give an example:
Bundle-SymbolicName: foo.B
Export-Package: foo.B
Bundle-SymbolicName: foo.A
Require-Bundle: foo.B;visibility:=reexport
This should automatically result in foo.A bundle exporting foo.B
package, right?
Not sure if this was answered, but the above will result in foo.B
package being visible from foo.A bundle for any bundles that require foo.A
.
-> richard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]