3 Replies Latest reply on Sep 19, 2005 8:43 AM by freezy

    AOP annotations with Jdk1.4.2 and Eclipse 3.1 (1.5M2 plugin)

    freezy

      Hi, it's me again :-) I'm trying to use the JBoss AOP annotations feature in Eclipse. My Eclipse configuration is:

      Eclipse 3.1 (running under JDK 1.5.0_04)
      JBossIDE-1.5M2-AOP-Developer Plugin
      Eclipse projects are developed with JDK1.4.2
      Windows XP, german language
      


      Code snippet from one of my methods with annotations (including a space after "@@profile"):

       /**
       *
       * main operation
       *
       * @param args
       *
       * @@profile
       */
       public static void main(java.lang.String[] args)
       {
       TestApp testApp = new TestApp();
       testApp.test();
       }
      


      My jboss-aop.xml includes the following pointcut definitions:

       [...]
       <bind pointcut="all(@profile)">
       <interceptor class="eshop.aop.SimpleProfilingInterceptor"/>
       </bind>
       [...]
      


      Unfortunately, it does not work. The annotation seems to be ignored or not compiled. In the project properties I have two builders listed:
      1) Java Builder
      2) AOP Project Builder

      Additionally, there is only the normal java class in the "bin" directory. No aspectized version like "EShopApp$doWhatEver_Nxxxxxxxxxxx.class"... I also decompiled the class file to see if it has changed methods. Found nothing :-(

      So, am I missing a builder? Or some extra-configuration? I would really like to use the promising annotation-feature out of Eclipse.

      Thanks for your help,
      freezy

        • 1. Re: AOP annotations with Jdk1.4.2 and Eclipse 3.1 (1.5M2 plu
          kabirkhan

          In your other thread, I think you're mentioning that you are using JDK 5? Annotations created using the 1.4 annotation compiler will only get picked up if you run using JDK 1.4, not 5.

          The underlying classes used for picking out annotations are different in jboss-aop.jar and jboss-aop-jdk50.jar. jboss-aop.jar will check for JDK 1.4 annotation compiler generated annotations, and jboss-aop-jdk50.jar will look for annotations natively.

          I've asked our IDE author to take a look at this and your other question, since I have not tried out this functionality in the IDE myself yet

          • 2. Re: AOP annotations with Jdk1.4.2 and Eclipse 3.1 (1.5M2 plu
            freezy

             

            "kabir.khan@jboss.com" wrote:
            In your other thread, I think you're mentioning that you are using JDK 5? Annotations created using the 1.4 annotation compiler will only get picked up if you run using JDK 1.4, not 5.

            The underlying classes used for picking out annotations are different in jboss-aop.jar and jboss-aop-jdk50.jar. jboss-aop.jar will check for JDK 1.4 annotation compiler generated annotations, and jboss-aop-jdk50.jar will look for annotations natively.


            I'm compiling my project with JRE/JDK 1.4.2. I also created a new AOP project and checked the "use JDK 1.4" option. I also checked the libraries in my project configuration and they match "jdk1.4" and "jboss-aop.jar".


            I've asked our IDE author to take a look at this and your other question, since I have not tried out this functionality in the IDE myself yet


            Thanks a lot!

            • 3. Re: AOP annotations with Jdk1.4.2 and Eclipse 3.1 (1.5M2 plu
              freezy

              Annotation support is working! I forgot to have an interface for the annotation...

              An error message like the annotationc Ant task would have been useful :-(