"adrian(a)jboss.org" wrote :
| If you really want to exclude the AOPDependencyBuilder processing from a bean then
| you should really use one of AOP's existing mechanisms like exclude
"org.jboss.ejb3.*"
| from having aspects applied to it (that can be configured on the AspectManager).
|
| That way AOP should be able to "short circuit" the aspect dependency
checking
| for those pojos using the same "filters".
Adding something to AOP to avoid the aspect dependency checking in the Describe phase and
avoiding the proxy checking in the Instantiate phase is trivial. The question is the
easiest/best mechanism to do so.
I think the default should be to use AOP as current unless you opt out for a particular
bean, since a lot of tests already rely on AOP being turned on. The current filters are
classname based, which is not a good choice for this. Although jaikiran says otherwise,
AFAICR the filters are turned off for proxies anyway, they only apply to weaving classes.
The simplest option would be to add an annotation per bean instance, e.g. @NoAopCheck
which would make the AOPDependencyBuilder a no-op, and force the AOPConstructorJoinPoint
to avoid the heavy stuff and simply call the default implemetation in its super class
BasicConstructorJoinPoint. So, AOP is either on (default) or off for a bean.
As you say, this runs the risk of the class not getting the necessary aspects applied to
beans where the aop stuff is turned off, but I don't see anything wrong with having
this as a choice for an advanced user who knows what they are doing? You have to add the
@JMX annotation anyway to register things in JMX, which seems to be the main use-case.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230495#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...