[jboss-jira] [JBoss JIRA] Commented: (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 14:16:46 EDT 2010


    [ https://jira.jboss.org/browse/JBAOP-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12535838#action_12535838 ] 

Flavia Rainone commented on JBAOP-796:
--------------------------------------

The same fix needs to be applied to line 419 of GeneratedClassAdvisor, for generated advisor weaving.

> 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(WovenClass.class). 
> The correct is to create the advisor by calling something equivalent to AspectManager.instance(WovenClass.class.getClassLoader()).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