[jboss-dev-forums] [Design of AOP on JBoss (Aspects/JBoss)] - Re: Reimplementing ClassPools for AS

adrian@jboss.org do-not-reply at jboss.com
Wed Jan 14 04:42:11 EST 2009


"kabir.khan at jboss.com" wrote : I have added some failing tests to https://svn.jboss.org/repos/jbossas/projects/jboss-cl/trunk/classloading/src/test/java/org/jboss/test/classloading/dependency/test/ModuleClassLoadingUnitTestCase.java
  | It mainly seems to be a problem when modules/packages have versions

Yep, I found that myself after I left the office last night.
I won't port your test to the 2.0 branch since I already have my own. ;-)

It was using the wrong findLoader method
i.e. it was doing an importAll=true search all the time
instead of using rules specific to the classloader


  | Index: classloader/src/main/java/org/jboss/classloader/spi/base/BaseClassLoader.java
  | ===================================================================
  | --- classloader/src/main/java/org/jboss/classloader/spi/base/BaseClassLoader.java       (revision 82854)
  | +++ classloader/src/main/java/org/jboss/classloader/spi/base/BaseClassLoader.java       (working copy)
  | @@ -370,7 +370,7 @@
  |        ClassLoaderUtils.checkClassName(className);
  |        String path = ClassLoaderUtils.classNameToPath(className);
  |        
  | -      Loader loader = domain.findLoader(path);
  | +      Loader loader = domain.findLoader(this, path, basePolicy.isImportAll(), true);
  |        if (loader == null)
  |           throw new ClassNotFoundException("Class " + className + " not found from " + this);
  | 

I've upl,oaded a new  2.0.2-SNAPSHOT with this fix included.

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

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



More information about the jboss-dev-forums mailing list