[jboss-dev-forums] [Design of AOP on JBoss (Aspects/JBoss)] - Re: Dynamic AOP API
flavia.rainone@jboss.com
do-not-reply at jboss.com
Thu Aug 14 13:48:42 EDT 2008
I've been thinking about this API, and I realized that, if I was going to use it, I would rather do this:
String pointcut = "execution(*->new(..))";
| Object handle = DynamicAOP.bind(pointcut, MyAspect.class, "adviceName");
|
Than this:
String pointcut = "execution(*->new(..))";
| DynamicBindingOperation dbo = new DynamicBindingOperation();
| dbo.setPointcut(pontcut);
| AdviceInfo advice = new AdviceInfo(MyAspect.class, "adviceName");
| dbo.setAdviceInfo(advice);
| DynamicAOP.execute(dbo);
|
I mean, for simple operations we should try to keep it simple, making it possible to execute the whole thing in a couple of lines?
In this case, I think we could maintain the dbo, using it with more complex bindings.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170633#4170633
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170633
More information about the jboss-dev-forums
mailing list