Why is the execution pointcut scary?! You can use your own annotation for matching (I.e. the @Lockable)...
Code:
<aop:pointcut expression="execution(* (@Lockable *..*.*(..)))" />
You can even bind it to a variable if you want.
Code:
public Object aroundLockable(ProceedingJoinPoint pjp,Object target, Lockable lock) {
// do your stuff.
Object retVal = pjp.proceed();
return retVal;
}
Code:
<bean id="myAspect" class="myAspectClass"/>
<aop:config>
<aop:pointcut id="lockableMethod" expression="execution(* (@Lockable *..*.*(..)) and target(target) and annotation(lock)" />
<aop:aspect ref="myAspect">
<aop:around pointcut-ref="lockableMethod" method="aroundLockable" />
</aop:aspect>
</aop:config>
Ofcourse you can do the same with @Aspect or the AspectJ language instead of in XML.