0 Replies Latest reply on Jan 27, 2005 3:04 PM by iapetus999

    Annotation problem on AOP1.1

    iapetus999

      This worked on AOP1.0

      I have methods that are annotated like this:


      @APerfAspect (perfName = "perfTest")
      private void perfTest(){
      ...
      }


      My jboss-aop.xml has this:

      <aspect class="com.memeticsystems.util.perf.PerfAspect"/>
          <bind pointcut="execution(* *->@com.memeticsystems.util.perf.APerfAspect(..))">
        <advice name="trace"
            aspect="com.memeticsystems.util.perf.PerfAspect"/>
    </bind>



      My aspect looks like this:

      @Aspect (scope = Scope.PER_VM)
      public class PerfAspect{
      public Object trace(MethodInvocation invocation) throws Throwable{
      final Method method = invocation.getMethod();
      final APerfAspect annotation = (APerfAspect)invocation.resolveAnnotation(APerfAspect.class);
      ...


      And my annotation interface looks like this:

      @Target({ElementType.METHOD})
      public @interface APerfAspect{
      String packageName() default PerfUtil.ROOT_PACKAGE_NAME;

      String perfName() default "";

      String perfCategory() default "";
      }


      When I call resolveAnnotation, it always returns null.
      When I step thru it , all of the AnnotationRepository's maps are empty.
      Any ideas what could be happening?