java - spring aop - chaining multiple aspects -


i have 2 aspects, 1 acquiring lock @around call, 1 debouncing method calls. aspects this:

@pointcut("execution(public * * (..))")   private void anypublicmethod() {}  @around("anypublicmethod() && @annotation(lock)") public object all(proceedingjoinpoint proceedingjoinpoint, lock lock) throws throwable {    // acquire lock, proceed() } 

and other 1 looks this:

@pointcut("execution(public * * (..))")   private void anypublicmethod() {}  @around("anypublicmethod() && @annotation(debounce)") public object all(proceedingjoinpoint proceedingjoinpoint, debounce debounce) throws throwable {     // debouncing described in      // http://stackoverflow.com/questions/4742210/implementing-debounce-in-java  } 

the full code:

https://github.com/rmalchow/debouncer-aspect/blob/master/src/main/java/com/skjlls/aspects/debounce/impl/debounceaspect.java

and

https://github.com/rmalchow/lock-aspect/blob/master/src/main/java/com/skjlls/aspects/lock/impl/lockaspect.java

when put both @debounce , @lock on method, exception:

required bind 2 arguments, bound 1 (joinpointmatch not bound in invocation)     @ org.springframework.aop.aspectj.abstractaspectjadvice.argbinding(abstractaspectjadvice.java:584)     @ org.springframework.aop.aspectj.abstractaspectjadvice.invokeadvicemethod(abstractaspectjadvice.java:610)     @ org.springframework.aop.aspectj.aspectjaroundadvice.invoke(aspectjaroundadvice.java:68)     @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:168)     @ org.springframework.aop.aspectj.methodinvocationproceedingjoinpoint.proceed(methodinvocationproceedingjoinpoint.java:85) 

it seems related spring aop not being able figure out next thing call in line aspect, not actual target, , have seen other reports spring aop 2 , 3 ... using:

spring 4.1.1.release 


Comments