Yep,
To get the PER_VM instance, you would do:
| MyAspect myAspect = (MyAspect)
AspectManager.instance().getPerVMAspect("org.blah.MyAspect");
|
Note that all instrumented classes implement the org.jboss.aop.Advised
interface. So for other scopes you would cast an instance to Advised.
Advised has the following two methods:
InstanceAdvisor _getInstanceAdvisor();
| Advisor _getAdvisor();
|
Advisor allows you to get PER_CLASS scoped aspect instances via the
getPerClassAspect() method. (It takes the aspect class name as its parameter)
InstanceAdvisor allows you to get PER_INSTANCE scoped aspect instances via the
getPerInstanceAspect() method. (It takes the aspect class name as its parameter)
Kabir
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3860603#3860603
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3860603
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development