The mock classloader isn't documented anywhere AFAIR,
I only created it for testing purposes.
The importAll and exportAll (not in the MockClassLoader)
are meant to duplicate what the old UCL does.
In the example you quote, it does do "importAll" so it will load from the whole
domain that the classloader belongs to.
The mock classloader has two important properties.
setPackages() - what is exported
setPaths() - what is part of the classloader (but not necessarily exported to other
classloaders)
There is a convience method to do both, setPackagesAndPaths()
In the api you show, the "PACKAGE_A" is what is included in the classloader and
what is exported.
The "true" means it will "importAll", i.e. look at all other
classloaders in the
order they were registered to find the class before looking at its own
private (non-exported) classes.
Try adding enableTrace("org.jboss.classloader") to the test
and you will see in detail where it is trying to load classes from
and where it found it.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076738#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...