1 Reply Latest reply on Jul 6, 2009 3:44 PM by flavia.rainone

    dynamic-aop example

    exodus

      Hi,
      I'm interested in the dynamic-aop example and what I want is to get rid pf the jboss-aop.xml if that's possible... If someone can tell me where to put what, I would be very grateful.
      I've tried almost everything, and cannot avoid the xml, whatever I do.
      Annotations on everything except the POJO class will go (even a workaround, since monitored classes are meant to be dynamicaly loaded).

      Thanks

        • 1. Re: dynamic-aop example
          flavia.rainone

          Hi!
          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:

          @Aspect
           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).