4 Replies Latest reply on May 28, 2003 3:46 PM by Bill Burke

    Declarative Programming

    Bill Burke Master

      Man, I dropped the ball. Maybe I can get this in DR1 maybe not.

      Since we have metadata in JBoss AOP, what I should have written is an interceptor pointcut that is based on metadata instead of a class expr.

      <interceptor-pointcut group="transaction">


      This would mean that if a class has defined a metadata group tag of "transaction" apply the following interceptor.

      The same could be done for introductions as well.

      Man, I really dropped the ball on this one. Let's see if I can get it in by Sunday. I know, I know. I've been yelling at everybody to not introduce new functionality at the last minute, but, oh well....


        • 1. Re: requiring Serializable
          Bill Burke Master

          > level. I'm pretty sure that I can replace new
          > HashMap with our own implementation at runtime. More
          > on this later.

          Can't wait that is the point Adrian and juha pitched in paris overwriting the classpool so that HM is return with JBossHM... see other thread in this forum :) itis so beautiful

          • 2. Re: Declarative Programming
            Bill Burke Master

            Ok, I implemented it. The question is should it be used?

            So, right now, you don't have to attach the transaction or security interceptor. All you have to do is declare metadata tags.

            <class-metadata group="transaction" class="POJO">



            Is it too implicit? Too hard to debug? The cool thing about this is once XDoclet integration is done, all you have to do is

            * @jboss-aop.metadata group="transaction" trans-attribute"Required"
            public void someMethod();

            Just add that, and transaction support is added. No need to declare a pointcut for the Tx interceptor.

            • 3. Re: Declarative Programming
              marc fleury Master

              personally I have been blabbing about the XDoclet integration for like 9 month. So yeah commit it if ready, that is CLEARLY useful for those doing pure metadata tag declarations. Also I have been blabbing to the press about the issue and saying how we copied a lot of the .net tag declaration approach... so yeah hell, it is just another implicit way of defining interceptors and one that will fit right in with Andy's work

              • 4. Re: Declarative Programming
                Adrian Brock Master

                Hi Bill,

                This is very cool.

                I was trying to think of something similar, but
                for a different reason.

                Can we use a similar mechanism to define
                payload when we do remoting, or does
                this belong at a different level?