[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: ClassLoader behaviour on remote clustering tests

flavia.rainone@jboss.com do-not-reply at jboss.com
Wed Apr 9 10:30:42 EDT 2008


Hi, Clebert!

anonymous wrote : Is there any hacks from javassist involved on calling the classLoader (direct calls to internal methods)?

Yes, Javassist calls defineClass method, which is internal to ClassLoader. look at the Javassist code that invokes defineClass method:

 method.setAccessible(true);
  | Class clazz = (Class)method.invoke(loader, args);
  | method.setAccessible(false);
  | return clazz;
  | 

anonymous wrote : Can you check if you are aways using the correct classloader?

The class loader we are using is the class loader that loaded the aspect class:
aspect.getClass().getClassLoader();
So that every class generated to interact with the aspect class is actually loaded by the same class loader that loaded the aspect class itself.

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

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



More information about the jboss-dev-forums mailing list