[jboss-user] [JBoss Microcontainer Development] New message: "ClassLoader ease-of-use again"

Adrian Brock do-not-reply at jboss.com
Mon Mar 8 10:35:00 EST 2010

User development,

A new message was posted in the thread "ClassLoader ease-of-use again":


Author  : Adrian Brock
Profile : http://community.jboss.org/people/adrian@jboss.org

There were a couple of tests in deployers-vfs that were using the export-all flag wrongly.
They had something like:
<classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY">
      <module name="test3"/>
Since the capabilities have been explicitly declared, the export-all should have been ignored,
but apparently it was not.
This was actually due to the Module asking the ClassLoaderPolicy for its exported()
delegate which does know about the capabilities filtering.
I've just changed this code so that it correctly uses the Module.determinePackages()
to decide what should be in the exported classes filter.
Accordingly, I had to fix the tests to declare they had the package capability:
<classloading xmlns="urn:jboss:classloading:1.0">
       <module name="test3"/>
       <package name="a.b.c"/>
When I first did this, I suggested that we might be able to support
the export-all flag even if capabilities are specified, e.g. if there
are no explicit packages then we use the export-all rule.
But if we are going to support it, it should be done properly, not
leaking in because of a bug. ;-)


To reply to this message visit the message page: http://community.jboss.org/message/530571#530571

More information about the jboss-user mailing list