I tried to switch from xml to annotation, and found that there is no option for stack and stack-ref within @Bind annotatation. Does it mean I have no choice, but to use xml file?
@Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface Bind { String pointcut(); String cflow() default ""; }
As of this date, JBoss AOP does not support the binding of stack and stack-ref elements with annotations.
I added a couple of Jira tasks to fix this problem:
http://jira.jboss.com/jira/browse/JBAOP-456
http://jira.jboss.com/jira/browse/JBAOP-457