Thomas Diesler [
http://community.jboss.org/people/thomas.diesler%40jboss.com] replied to
the discussion
"Wildcard support in Dynamic-imports"
To view the discussion, visit:
http://community.jboss.org/message/543214#543214
--------------------------------------------------------------
This approach causes these tests to fail
Failed tests:
testDynamicImportWithWildcard(org.jboss.test.osgi.core.jbosgi323.OSGi323TestCase)
testAllPackagesWildcard(org.jboss.test.osgi.classloader.DynamicImportPackageTestCase)
testAllPackagesWildcardNotWired(org.jboss.test.osgi.classloader.DynamicImportPackageTestCase)
testPackageWildcardWired(org.jboss.test.osgi.classloader.DynamicImportPackageTestCase)
testPackageWildcardNotWired(org.jboss.test.osgi.classloader.DynamicImportPackageTestCase)
AFAICS, the module tracking only works when the exporting module gets installed *after*
the importing module has its policy setup.
The WildcardClassLoaderPolicy should probably also scan allready existing modules when it
is setup. More generally, perhaps a ModuleTracker
that works simmilar to
http://www.osgi.org/javadoc/r4v42/org/osgi/util/tracker/BundleTracker.html BundleTracker
is needed.
Even then, addModule
public void addModule(Module current)
{
Domain md = getDomain(current);
if (md != null && current.canResolve(requirement))
{
...
}
will not add the exporting module because Module.canResolve(req) would not return
'true' for DynamicImport-Package: *
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/543214#543214]
Start a new discussion in JBoss Microcontainer Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]