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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...