I have deployed a Web service using Apache Came and Apache CXF and "code first" approach. It works fine.
<cxf:cxfEndpoint id="operacionesWSEndpoint" address="/operaciones"
serviceClass="foo.bar.OperacionesService">
</cxf:cxfEndpoint>
but I want to measure the performance of my service and log it. For that, I use Spring AOP using the following pointcut
@Pointcut("execution(* foo.bar.OperacionesService.*(..))")
public void operacionsMethods() {
}
@Around("operacionsMethods()")
public Object logTimeMethod(final ProceedingJoinPoint joinPoint) throws Throwable {
StopWatch stopWatch =
new StopWatch(joinPoint.getTarget().getClass().getSimpleName() + "."
+ joinPoint.getSignature().getName());
stopWatch.start();
Object retVal = joinPoint.proceed();
stopWatch.stop();
log.debug("performance: {}", stopWatch.shortSummary());
return retVal;
}
Well, is not working. Other methods and services are being logged using the same approach (AOP), but not the Web Service exposed by Camel.
I don't think there is any error with my code: service is working as well as other aspects. I feel I am missing something here regarding Apache Camel - CXF and Spring AOP and I did not find a similar problem.
Any ideas?