[jboss-dev-forums] [Design of AOP on JBoss (Aspects/JBoss)] - Re: Translatable ClassLoaders
kabir.khan@jboss.com
do-not-reply at jboss.com
Fri Jun 27 10:29:44 EDT 2008
Translatable is for integration with the UnifiedClassLoader in JBoss 4.x and with the RealClassLoader in JBoss 5. Basically, they will call AspectManager.transform() once a class is loaded. So basically Translatable means it is a JBoss AS classloader.
We haven't really done many tests with clever classloader stuff outside of JBoss, so I guess this is why we haven't picked this up before. I think the method shown should be this instead:
| public ClassPool findClassPool(ClassLoader cl)
| {
| if (!(cl instanceof Translatable))
| {
| // findClassPool has problems with boot and system classes.
| if (cl == null)
| {
| return registerClassLoader(SecurityActions.getContextClassLoader());
| }
| }
| return registerClassLoader(cl);
| }
|
| |
| | For boot and system classes Class.getClassLoader() will return null, and I think that might be what the comment refers to?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161191#4161191
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161191
More information about the jboss-dev-forums
mailing list