Bind Before/After Advices
To bind a before and after advices to a pointcut, you need to follow this structure: As you can see, it is as simple as declaring a usual tag, and adding to it and tags for before and after advices respectively. Not forgetting that we need to declare each aspect class with the tag (in the same way shown before). We can also mix interceptor declarations and around, before, and after advices declarations in a single binding, like follows: The tag above has been introduced by the previous example, and refers to advices of the default type, around. As an alternative, you can specify explicitly the type of an advice to be around by using the tag as follows: For clarity, we have opted to use the tag instead of on all examples of this tutorial that involve typed advices. Open up jboss-aop.xml to see an example of binding with typed advices: For more examples on typed advices bindings, refer the jboss-aop.xml file of our next example