This content has been marked as final.
Show 3 replies
-
1. Re: Translatable ClassLoaders
flavia.rainone Jun 27, 2008 9:43 AM (in response to flavia.rainone)The commentary
// findClassPool has problems with boot and system classes.
does not mean too much to me, since it doesn't tell what type of problems we can get. -
2. Re: Translatable ClassLoaders
kabirkhan Jun 27, 2008 10:29 AM (in response to flavia.rainone)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?
-
3. Re: Translatable ClassLoaders
flavia.rainone Jun 27, 2008 10:41 AM (in response to flavia.rainone)Great! I'll try to fix it and see if no aop tests (standalone and AS) get broken with it:
http://jira.jboss.com/jira/browse/JBAOP-606