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

alesj do-not-reply at jboss.com
Fri Dec 4 10:39:56 EST 2009


"flavia.rainone at jboss.com" wrote : 
  | ClassLoaderSystem system = (ClassLoaderSystem) getBean("ClassLoaderSystem");
  |   | ClassLoaderDomain domain = system.getDefaultDomain();
  |   | try{
  |   |       Class<?> clazz = domain.loadClass(JsfBean.class.getName());
  |   |       Assert.fail("Should not have been able to load " + JsfBean.class.getName());
  |   | } catch(Exception expected) {}
  | 
  | And it failed.
Debuging is your friend .... cccc!

BaseClassLoaderDomain.class

  |    public Class<?> loadClass(String name)
  |    {
  |       try
  |       {
  |          return loadClass(null, name, true);
  |       }
  |       catch (ClassNotFoundException e)
  |       {
  |          return null;
  |       }
  |    }
  | 
Hence no failure. ;-)


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

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



More information about the jboss-dev-forums mailing list