David_W (70) [Avatar] Offline
#1
Why is this(X) not the same as target(X)? Since the proxy is just an implementation construct from Spring, why would anyone want to use the current this(X)? If you use <aop:aspectj-autoproxy proxy-target-class="true"/>, then the proxy will extend the target class, so would you need to do something like this(MyServiceClass+), or would most sane people do this(MyServiceInterface)?

Also, you don't mention whether or not within(X) is allowed. And why not allow some of the disallowed ones, and then evaluate the condition in the proxy? Like cflow, cflowbelow, if, @this (if this referred to the target, and not the proxy - see above)?
ramnivas (171) [Avatar] Offline
#2
Re: comments about Spring handling of pointcuts in 9.3.1
The difference between this() and target() allows developers to pick if any code run from within an advice should go through the proxy chain (picked by this()) or not (picked by target()) if they call a method on the collected object. Without such differentiation, additional code will be needed to make such a decision. In AspectJ, things are easier, since a concept similar to proxy doesn't exist.

Thanks for pointing out within(). It is supported and I have made the change to note that.

As for cflow() etc., they may be supported in a future version.

-Ramnivas