-
Feb 27th, 2009, 03:19 AM
#1
Mixing proxy based and CGLIB based aspects
Hi
I'm introducing some aspects in an existing layered web application. DAO and service layers are defined by interfaces, but my JSF web layer is class based.
I would like to use <aop:aspectj-autoproxy /> to detect my aspects My question is: if i use <aop:aspectj-autoproxy proxy-target-class="true" />, I will get proxy based aspects for interfaces and CGLIB aspects for concrete classes or I will get CGLIB based aspects for all my classes?
Suggestions will be welcome
-
Feb 27th, 2009, 06:13 AM
#2
You will get CGLIB for all your classes that is what the proxy-target-class implies imho..
-
Feb 27th, 2009, 07:21 AM
#3
Ok.
Is there any significant performance difference between both aproaches? I'm asking because if proxy-based AOP has any clear advantage, I'd probably consider declaring interfaces for my web layer.
-
Feb 27th, 2009, 07:31 AM
#4
It is simpler, follows best practices (interface based programming), you can make classes final (you cannot do this with cglib). Just to name a few
-
Feb 27th, 2009, 01:09 PM
#5
Ok
I'll re-design the web layer using interfaces
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules