Hello everyone!
One of the great features we are adding to JBoss AOP 2.0 are the typed advices (before/after/after-throwing/finally). Currently, only the configuration of those by xml is implemented:
<bind pointcut="pointcut expression"> <before name="advice name" aspect="aspect class name"/> </bind> <bind pointcut="pointcut expression"> <after name="advice name" aspect="aspect class name"/> </bind> <bind pointcut="pointcut expression"> <throwing name="advice name" aspect="aspect class name"/> </bind> <bind pointcut="pointcut expression"> <finally name="advice name" aspect="aspect class name"/> </bind>
<bind pointcut="pointcut expression"> <around name="advice name" aspect="aspect class name"/> </bind>
public @interface Bind { String pointcut(); String cflow() default ""; }
I'd originally seen this as option 1) using @Before, @After, @Throwing and @Finally, but having seen 2) I think I prefer that, since it is less annotations to remember for the same "sort of stuff"?