[jboss-dev-forums] [Design the new POJO MicroContainer] - Generated Classes not found if they do not match any of Base

kabir.khan@jboss.com do-not-reply at jboss.com
Wed Dec 10 12:03:41 EST 2008


I don't think this is a problem for AOP since whenever we generate classes they will be using the package of one of the classes in the classloader used to generate the class, but I thought I'd point out my following finding.

I create a domain with 2 BaseClassLoaders. classLoaderA has package blah.a, and classLoaderB has package blah.b. Now if I use javassist to create a class called not.registered.package.SomeClasss in ClassLoaderA then


  | //works since the class is registered in the loader's loaded classes
  | classLoaderA.loadClass("not.registered.package.SomeClasss"); 
  | //Does not work since not.registered.package is not in the 
  | //list of packages of any of the loaders registered in the domain
  | classLoaderA.loadClass("not.registered.package.SomeClasss"); 
  | 
  | 
  | 

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

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



More information about the jboss-dev-forums mailing list