Announcement Announcement Module
Collapse
No announcement yet.
@Around advice not work Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Around advice not work

    Hi all,
    i'm new to the aop programming and i have a big issue with @Around advice.
    I've a maven project with
    - aspectjrt and aspectjweaver 1.7.1
    - spring 3.2.0

    According with official guide (http://static.springsource.org/sprin.../html/aop.html) i've inserted <aop:aspectj-autoproxy/> to my applicationContext and an example aspect

    If i try @AfterReturning @Before @After @AfterTrowing with a specified @Pointcut all go ok, but if i use @Around advice not working.

    This is the pointcut and it's around advice

    Code:
    @Pointcut("execution(* it.trecube.gui.diplomatici.server.db.service.PersonDbService.findPersonDiplomatici(..))")
    	private void dbFindOperationNoArgs() {}
    
    
    @Around("dbFindOperationNoArgs()")
    	   public Object aroundAdv(ProceedingJoinPoint joinPoint) throws Throwable {
    		    // start stopwatch
    		    Object retVal = joinPoint.proceed();
    		    // stop stopwatch
    		    return retVal;
    	   }
    It's very strange for me because all other advice annotation work


    Thanks for any suggestions
Working...
X