[jboss-jira] [JBoss JIRA] Created: (JBAOP-796) Creation of ClassAdvisor must use the AspectManager equivalent to the advised class' ClassLoader

Flavia Rainone (JIRA) jira-events at lists.jboss.org
Tue Jun 15 13:33:46 EDT 2010


Creation of ClassAdvisor must use the AspectManager equivalent to the advised class' ClassLoader
------------------------------------------------------------------------------------------------

                 Key: JBAOP-796
                 URL: https://jira.jboss.org/browse/JBAOP-796
             Project: JBoss AOP
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 2.1.9.Alpha1
            Reporter: Flavia Rainone
            Assignee: Flavia Rainone
             Fix For: 2.1.6 CP01, 2.1.9.GA, 2.2.1.GA


Currently, an Advisor is created by calling AspectManager.instance().getAdvisor(). 

The correct is to create the advisor by calling AspectManager.instance(WovenClass.class).getAdvisor(WovenClass.class).

Otherwise, the Advisor will be created as part of the AspectManager/Domain corresponding to the current context class loader:
   public static synchronized AspectManager instance()
   {
      return instance(Thread.currentThread().getContextClassLoader());
   }

In the JBoss AS environment, if the woven class is loaded during an archive deployment, this is equivalent to say that the Advisor will be erroneously created by the domain of the current deployment, instead of being created by the appropriate AspectManager/Domain instance.

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

        


More information about the jboss-jira mailing list