1 Reply Latest reply on Sep 27, 2010 6:36 AM by Kabir Khan

    With compile-time weaving, why does AOP need run-time configuration?

    Tim Boemker Newbie

      http://docs.jboss.org/aop/1.3/aspect-framework/reference/en/html/running.html#standalone-compiletime says that, at run time, JBoss AOP needs to find XML configuration files.

       

      Why is that?  Having run aopc, I would expect all of the configuration to have been done.

       

      Thanks,

       

      Tim

        • 1. Re: With compile-time weaving, why does AOP need run-time configuration?
          Kabir Khan Master

          Because JBoss AOP is fully dynamic when it comes to weaving. It follows a two step process

           

          1) When the class is woven (either at compile time or when the class is first woven) we put in the hooks for interception to happen. These hooks are the same for a member matching the pointcut expression of a <bind> element or a <prepare> element.

           

          2) When you create an instance of the class (at runtime) the advices are created according to the sub-elements of <bind> elements for its member hooks.