You are kind of both right. :-)
The functionality is ok since it is protected by a permission check.
But there's no reason to maintain a map of module->classloader.
The module already has a protected getClassLoader() method.
The map exists the other way around classloader -> module
to avoid having to iterate over all the domains/modules.
The module doesn't have a classloader until its dependencies are satisfied
and the module is asked to construct the classloader, which is why there is a callback
to maintain the map.
I've tidied this up in 2.0.x and trunk
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204945#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...