[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Testing Deployers with new Reflect + ClassPool

alesj do-not-reply at jboss.com
Fri Nov 6 07:11:36 EST 2009


"flavia.rainone at jboss.com" wrote : I thought on using a ModuleRegistry, but I can't find out how to get to the parameters required for initMapsForLoader from the module. I'm clueless on what is the correct approach for calling initMapsForLoader method. Any ideas?
ModuleRegistry gets Module passed in. Perhaps this then:

  | ClassLoader cl = ClassLoading.getClassLoaderForModule(module);
  | DeploymentUnit unit = AbstractDeploymentClassLoaderPolicyModule.class.cast(module).getDeploymentUnit();
  | ClassLoader parentUnitLoader = unit.isTopLevel() ? null : unit.getParent().getClassLoader();
  | 

Dunno how we would then handle if you register CL directly in -beans.xml --> VFSClassLoaderPolicyModule.
But I guess this falls into parentUL = null category.


  | ClassLoader cl = ClassLoading.getClassLoaderForModule(module);
  | DeploymentUnit unit = null;
  | if (module instance of AbstractDeploymentClassLoaderPolicyModule)
  |    unit = AbstractDeploymentClassLoaderPolicyModule.class.cast(module).getDeploymentUnit();
  | ClassLoader parentUnitLoader = unit == null || unit.isTopLevel() ? null : unit.getParent().getClassLoader();
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264316#4264316

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264316



More information about the jboss-dev-forums mailing list