[jboss-user] [JBoss AOP] - Re: How to refactor to set privilege access for diff package

john_woo@canada.com do-not-reply at jboss.com
Tue Oct 21 13:36:33 EDT 2008

"flavia.rainone at jboss.com" wrote : With AOP, it is possible to do this without refactoring classes in com.a.
  | You can use declaration of error/warning messages. This is how it works:
  | http://www.jboss.org/jbossaop/docs/1.5.0.GA/docs/aspect-framework/examples/declare/declare.html
  | It is configurable, because you just need to edit the pointcut expression used inside the declare-error tag to change the rules.
  | This can also be done with annotations instead of xml:
  | http://www.jboss.org/jbossaop/docs/1.5.0.GA/docs/aspect-framework/examples/annotated-declare/annotated-declare.html

Thanks lots, that's great idea.

I'm wondering:
1. How to express the caller within com.b?
2. if I prefer using annotation, and in my case, say I want only 20 out of 5000 methods defined in com.a can be called by from com.b, does that mean I'll have to put the annotation mark in 4980 methods in com.a (how to do the other way around)?
3. any run-time performance issue for using this AOP?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183599#4183599

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183599

More information about the jboss-user mailing list