On 2010-05-27 21.37, Niclas Hedhman wrote:
Wow, big things happening!
I have no clue of ASM (nor CGLib for that matter), and don't
understand why things wouldn't be GC'd.
Since I can't find any GC root references, I don't get it either. But it
seems related to how CGLIB does various kinds of caching, and it's
really hard to do anything about it. Googling on this it seems both
Spring and Hibernate have had massive problems also because of CGLIB.
I had no clue of ASM either, but with the ASMifier helper it is quite
manageable: just write your Java code that you want to generate, and the
tool writes the Java code calling ASM to generate it. What I did then
was to create a bunch of methods in different styles (return void/not
void, throw exception/no exception, no params/lots of params, etc.) and
generate code for that. To create a generic generator is then mostly a
matter of making a long series of for/each and if/else that handle all
the cases.
What about java.lang.reflect.Proxy generation? Are those classes not
causing trouble?
From the articles I've found on the net the Proxy classloading is fine.
I've already created a class generator for mixins, and ALL but one test
passes! The main thing I skipped, which is why the remaining test fails,
is that I don't overload implemented methods in a mixin. So when a mixin
calls itself internally no concerns are called.
I'm not sure what to do about it, but I can see value in being able to
call internally without the concerns being applied. *If* I want the
concerns to be applied I can simply do a @This injection and use that,
which will force concerns to be used.
Does that sound ok? If so, I'm almost there...
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev