Announcement Announcement Module
Collapse
No announcement yet.
Schema<->@Aspect incompatibilities Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Schema<->@Aspect incompatibilities

    I've converted a number of aspects from @Aspect to "schema" style of AOP.
    I was using "argNames" in the Java annotations, and converted that to "arg-names" attributes on <aop:around> etc.

    Most of these were "around" aspects, so they had a first parameter of type "ProceedingJoinPoint".

    It seems that there is a compatibility problem between the two AOP styles: the code using @AspectJ only included _additional_ parameters (matched my args() pointcut designator etc) in the argNames annotation parameter - and this code works!

    However, the "schema" style requires the "ProceedingJoinPoint" parameter to be part of the "arg-names" attribute as well.

    Is there any specific reason for such inconsistency? Perhaps some refactoring to remove code duplication is in order?
    In addition, the reference manual does not make it clear whether a potential first ProceedingJoinPoint parameter should be part of argNames/arg-names or not.

  • #2
    There is a bug filed against this issue (http://opensource.atlassian.com/proj...rowse/SPR-3723). I will be working on this bug shortly.

    -Ramnivas

    Comment


    • #3
      So, any news which variation (with or without PJP) will be valid?

      Does "core" AspectJ actually specify this, or is it undocumented there as well?

      Comment


      • #4
        The current thinking is that the bug will be fixed by aligning both kind of usage. As far as "core" AspectJ is concerned, since there is no syntax equivalent to schema-based aspect, it doesn't have this issue.

        -Ramnivas

        Comment


        • #5
          Yes, obviously aligning the two styles is what this is all about.

          Let me explain my other question:
          argNames is part of AspectJ 5, for example org.aspectj.lang.annotation.Before declares it as an annotation parameter.

          So what does the AspectJ 5 specification say about interplay of argNames and a potential present JoinPoint/ProceedingJoinPoint parameter?

          Comment


          • #6
            So, it's undocumented in AspectJ as well?

            Comment

            Working...
            X