@Around("within(@org.springframework.stereotype.Repository *)")
    public Object invoke(ProceedingJoinPoint joinPoint) throws Throwable {
        if (this.enabled) {
            StopWatch sw = new StopWatch(joinPoint.toShortString());

            sw.start("invoke");
            try {
                return joinPoint.proceed();
            } finally {
                sw.stop();
                synchronized (this) {
                    this.callCount++;
                    this.accumulatedCallTime += sw.getTotalTimeMillis();
                }
            }
        } else {
            return joinPoint.proceed();
        }
    }
Simple aspect that monitors call count and call invocation time. It uses JMX annotations and therefore can be
monitored using any JMX console such as the jConsole
<p/>
This is only useful if you use JPA or JDBC.  Spring-data-jpa doesn't have any correctly annotated classes to join on

@author Rob Harrop
@author Juergen Hoeller
@author Michael Isvy
@since 2.5
src/main/java/org/springframework/samples/petclinic/util/CallMonitoringAspect.java