Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] avoid locked method invocation with an annotation

On Monday 15 February 2010 08:52:12 am jeanlouis.pasturel@xxxxxxxxxxxxxxxxxx's 
cat walking on the keyboard wrote:
>  Are you sure you can use proceed method with a before advice? I think you
> can use it only with around advice.
> 


Ops, you are right. However I've sligthly changed my pointcut defintion as 
follows:

private pointcut avoidLockedMethodInvocation( AgentProxy proxy, Lock 
lockingAnnotation ) : call( public * AgentProxy+.*(..) )
     									&&
     									@annotation(lockingAnnotation)
     									&&
     									target( proxy );

Now I've got a warning that states "does not match because declaring type is 
java.lang.Object, if match desired use 
target(whitecat.core.agents.AgentProxy+) [Xlint:unmatchedSuperTypeInCall]"

What does it means? I'm already using a AgentProxy+ as target....

Luca



Back to the top