[jboss-jira] [JBoss JIRA] Created: (JBAOP-749) Advisor.hasAnnotation calls annotation repository twice

Carlo de Wolf (JIRA) jira-events at lists.jboss.org
Fri Aug 28 07:00:24 EDT 2009


Advisor.hasAnnotation calls annotation repository twice
-------------------------------------------------------

                 Key: JBAOP-749
                 URL: https://jira.jboss.org/jira/browse/JBAOP-749
             Project: JBoss AOP
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 2.1.4.GA
            Reporter: Carlo de Wolf
            Priority: Blocker


  100.0% - 2,710 s - 41 inv. org.apache.tomcat.util.net.JIoEndpoint$Worker.run
 JDBC calls
 JNDI calls
  9.3% - 250 s - 32,425 inv. org.jboss.ejb3.metadata.annotation.AnnotationRepositoryToMetaData.hasAnnotation(java.lang.reflect.Member, java.lang.String)
  8.9% - 242 s - 32,425 inv. org.jboss.ejb3.metadata.annotation.AnnotationRepositoryToMetaData.hasAnnotation(java.lang.reflect.Member, java.lang.Class)
  2.4% - 65,435 ms - 8,972 inv. org.jboss.ejb3.metadata.annotation.AnnotationRepositoryToMetaData.resolveAnnotation
  0.2% - 5,189 ms - 5,409 inv. org.jboss.ejb3.metadata.annotation.AnnotationRepositoryToMetaData.resolveClassAnnotation

When annotationClass != null, the annotation repository gets hit twice.
      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