[jboss-jira] [JBoss JIRA] Created: (JBAOP-750) Advisor.hasAnnotation() calls AnnotationRepository.hasAnnotation() twice

Kabir Khan (JIRA) jira-events at lists.jboss.org
Fri Aug 28 07:40:23 EDT 2009


Advisor.hasAnnotation() calls AnnotationRepository.hasAnnotation() twice
------------------------------------------------------------------------

                 Key: JBAOP-750
                 URL: https://jira.jboss.org/jira/browse/JBAOP-750
             Project: JBoss AOP
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 2.1.4.GA
            Reporter: Kabir Khan
            Assignee: Kabir Khan
             Fix For: 2.1.5.GA


What's also visible in the table is that AOP makes us dive into MDR twice for no apparent reason. It appears to stem from the Advisor.hasAdvisor code when it's 
called with annotationClass != null:
      try
      {
         if (annotationClass != null && annotations.hasAnnotation(m, annotationClass)) 
            return true;

         else if (annotations.hasAnnotation(m, annotation)) return true;

      }
      catch(Exception ignore)
      {
         //When resolving annotations from the annotation repository we don't want to hit the annotation repository with the metadata from base-aspects.xml (@security, @transaction etc.)
         //EJB 3 uses a custom metadata loader that tries to load up all these classes by name, and that will cause errors when loading up the annotations
      }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list