tags:

views:

261

answers:

1

In my jboss-aop.xml, if I mark pointcuts using normal signature, like this:

<bind pointcut="execution(public void org.POJO->noop())">
<Interceptor class="org.SimpleInterceptor"/>
</bind>

aspects compile without a problem, but if I use annotation, like this

<bind pointcut="execution(void *->@org.Trace(..))">
<interceptor class="org.SimpleInterceptor"/>
</bind>

then there is no aop compile - no error, but the pointcut is not compiled. So - anybody knows if the maven jboss aop plugin supposed to be able to compile annotation marked pointcuts?

A: 

After exploration of the jboss aop sdk (where annotation example worked) and hours of trying to bring 2 projects together to find a reason, the offender was missing

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.RUNTIME)

on my Trace interface. In combination with the aop compiler being very picky to almost every aspect of its setup and silently not compiling if anything vital (like goal/compile) is missing, this was a pretty entertaining puzzle!

Sergey Aldoukhov