Matt<br /> <br />Author: <a href="http://springlive.com" target="_blank" rel="nofollow">Spring Live</a> and <a href="http://www.apress.com/book/bookDisplay.html?bID=256" target="_blank" rel="nofollow">Pro JSP</a><br />Weblogs: <a href="http://raibledesigns.com" target="_blank" rel="nofollow">Raible Designs</a> <a href="http://jroller.com/page/raible" target="_blank" rel="nofollow">Spring Live Blog</a>
Originally posted by karthik Guru:
Matt, are these interceptors implemented using Dynamic Proxies / somethign else? for that matter how is Spring AOP implemented. Does it fall under the category of Dynamic AOP like aspectwerkz / Do we have to write our aspects the way it is in AspectJ.
Matt<br /> <br />Author: <a href="http://springlive.com" target="_blank" rel="nofollow">Spring Live</a> and <a href="http://www.apress.com/book/bookDisplay.html?bID=256" target="_blank" rel="nofollow">Pro JSP</a><br />Weblogs: <a href="http://raibledesigns.com" target="_blank" rel="nofollow">Raible Designs</a> <a href="http://jroller.com/page/raible" target="_blank" rel="nofollow">Spring Live Blog</a>
Originally posted by Ali Pope:
take a look at the nice solutions to integrate AspectJ (the most powerfull AOP solution for the moment) and AspectWerkz. These 2 solutions are very powerfull in what regards AOP and will probably serve you better than the simple solution (but in any case not bad solution ) of Spring.
./pope
Originally posted by Matt Raible:
Spring uses dynamic proxies when proxying interfaces and dynamic byte-code generation (using CGLIB when proxying against classes. It intercepts methods by generating subclasses dynamically. These subclasses override parent methods and have hooks to invoke interceptor implementations.
One limitation is that dynamic subclasses cannot override and proxy final methods.
Originally posted by karthik Guru:
Looks like CGLIB is everywhere these days?
Does'nt Hibernate also use CGLIB? On a side note do any of the application servers employ CGLIB for code generation for EJBs as well?
Matt<br /> <br />Author: <a href="http://springlive.com" target="_blank" rel="nofollow">Spring Live</a> and <a href="http://www.apress.com/book/bookDisplay.html?bID=256" target="_blank" rel="nofollow">Pro JSP</a><br />Weblogs: <a href="http://raibledesigns.com" target="_blank" rel="nofollow">Raible Designs</a> <a href="http://jroller.com/page/raible" target="_blank" rel="nofollow">Spring Live Blog</a>
Originally posted by Ali Pope:
karthik: afaik AspectJ uses indeed CGLLIB too,
./pope
Originally posted by karthik Guru:
You need to correct me if i'm wrong. I thought aspectj compiler manipulates the .class file. Does'nt CGLIB generate class files dynamically after the class is loaded in the JVM?
Does the original .class file (which is a target of a cross cutting concern) get changed when using CGLIB?
and what is ASM
Originally posted by Ali Pope:
ajc/iajc (AspectJ) compiler is written in java and so it manipulates also the code in memory ../pope
Don't get me started about those stupid light bulbs. |