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

kabir.khan@jboss.com do-not-reply at jboss.com
Wed Dec 2 06:41:35 EST 2009


I've had a look

  |    public void testURLChildOfGlobalUcl() throws Exception
  |    {
  |       L globalLoader = testScenario.createLoader(new CLDeploymentBuilder("GLOBAL", JAR_A_1));
  |       L childALoader = createChildURLLoader(globalLoader, JAR_B_1);
  |       
  |       testScenario.loadClass(childALoader, globalLoader, CLASS_A);
  |       testScenario.loadClass(childALoader, CLASS_B);
  |       
  |       L childBLoader = createChildURLLoader(globalLoader, JAR_A_2);
  |       System.out.println("========> G" + globalLoader);
  |       System.out.println("========> A " + childALoader);
  |       System.out.println("========> B " + childBLoader);
  |       testScenario.loadClass(childBLoader, globalLoader, CLASS_A);      
  |    }
  | 
The output shows G and A to always have a classloader, probably because the testScenario call maintains a strong reference to the loader? B sometimes is shown to have null loader, so createChildURLLoader needs to be reworked somehow to maintain a strong reference to the loader.

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

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



More information about the jboss-dev-forums mailing list