[jboss-dev-forums] [Design of POJO Server] - Re: Classloader problem with NamingRestartUnitTestCase

bstansberry@jboss.com do-not-reply at jboss.com
Tue Feb 5 14:01:59 EST 2008


Quick report as I poke around in this as well.

Looking more into what AOPDependencyBuild.getDependencies does, following from the AspectManagerFactory.getAspectManager() call you highlighted:


  | AspectManager manager = AspectManagerFactory.getAspectManager(metaData);
  |       try
  |       {
  |          ClassInfo classInfo = classAdapter.getClassInfo();
  |          String className = classInfo.getName();
  |          if (className != null)
  |          {
  |             ClassLoader loader = classAdapter.getClassLoader();
  |             if (loader == null)
  |             {
  |                loader = Thread.currentThread().getContextClassLoader();
  |             }
  |             Class clazz = loader.loadClass(className);
  | 

The classAdapter.getClassLoader() call is returning the BaseClassLoader from the previous deployment.  That happens before any usage is made of the AspectManager.

Looking more into that, I see a chain of AbstractBeanInfo.classAdapter.classInfo.getType().getClassLoader(). Looking at classInfo.getType() I see it's actually ClassInfoImpl.annotatedElement.

I'm going to poke a bit more and see if I can figure out where the AbstractBeanInfo and the ClassInfoImpl.annotatedElement are coming from.

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

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



More information about the jboss-dev-forums mailing list