[jboss-user] [JBoss AOP] - Re: dynamic-aop example

flavia.rainone@jboss.com do-not-reply at jboss.com
Mon Jul 6 15:44:59 EDT 2009

If you don't want to use the jboss-aop.xml file, you have to use annotations intead.

Replace the jboss-aop.xml file with an aspect class like the one below:
  |         public class SomeAspect
  | {
  |    @Prepare ("all(org.jboss.test.aop.jdk15annotated.PreparePOJO)")
  |    public static Pointcut preparePOJO;
  | }
Replace "all(org.jboss.test.aop.jdk15annoated.PreparePOJO)" by the prepare expression you want to use.
Finally, don't forget to set the aoppath so that JBoss AOP can load the annotated class in the same way it would load the jboss-aop.xml (take a look at the annotated target of the annotated tutorial examples).

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242051#4242051

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242051

More information about the jboss-user mailing list