Hi.
I got problem with annotation in pointcut. I want to run my aspect only when methods which are invoked are annotated with my annotation.
xml
I got more aspect which are ordered.Code:<aop:aspect id="dataWarehouseAspect" ref="dataWarehouseAspectBean"> <aop:around method="processMessage" pointcut="com.mikel.aspect.DataWarehouseAspect.dataWarehouseMethods()"/> </aop:aspect>
Now the pointcuts in the class:
Those pointcut are defined in DataWarehouseAspect. When annotaed methos are invoked, no action in processMessage method in this aspectCode:@Pointcut("@annotation(com.mikel.aspect.DataWarehouseMessage)")// the pointcut expression private void dataWarehouseMessage() {}// the pointcut signature @Pointcut("execution(* com.mikel.server.kernel.service.*.*(..))")// the pointcut expression private void allServiceMethods() {}// the pointcut signature @Pointcut("execution(* com.mikel.server.kernel.CallmanServer.*(..))")// the pointcut expression private void allServerMethods() {}// the pointcut signature @Pointcut("((allServiceMethods() || allServerMethods()) && dataWarehouseMessage())")// the pointcut expression public void dataWarehouseMethods() {}// the pointcut signature
What im doing wrong ? I tried almost everythink.



Reply With Quote
