Currently bundle class loading uses VFSClassLoaderPolicy, which seems to load the class
from the private packages first rather than considering imports.
This is related to
https://jira.jboss.org/jira/browse/JBOSGI-135
How can I configure/swap the policy being used?
More specifically I see in BaseClassLoaderDomain that
| Loader findLoaderInImports(ClassLoaderInformation info, String name, boolean
trace)
| {
| List<? extends DelegateLoader> delegates = info.getDelegates();
| if (delegates == null || delegates.isEmpty())
| {
| if (trace)
| log.trace(this + " not loading " + name + " from imports it
has no delegates");
| return null;
| }
|
does not have delegates for imports.
At the end of the day I want org.apache.felix.log.jar to load
[org.osgi.service.log.LogService] from org.osgi.compendium.jar
You can reproduce the issue by running
| [tdiesler@tdvaio trunk]$ mvn -Dtest=SimpleLogServiceTestCase test
|
| Running org.jboss.test.osgi.integration.simple.SimpleLogServiceTestCase
| FIXME [JBOSGI-135] Cannot handle package beeing imported and exported by the same
bundle
| Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.355 sec
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251255#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...