6 Replies Latest reply on May 12, 2006 11:41 AM by Adrian Brock

    JBAOP-82 - AOP Proxy Factory

    Adrian Brock Master

      AFAIK this is also done, with the exception of supporting
      Serializable proxies (not a high priority except for things like JCA's usage).

      So again I think this just needs some more tests on whatever corner
      cases that people can think of.
      I do know there are no tests for mixins, only introductions.

        • 1. Re: JBAOP-82 - AOP Proxy Factory
          Kabir Khan Master

          I have added some tests and fixes for mixins (subtask JBAOP-234) in the ProxyFactoryTestSuite. I guess next we need to integrate this functionality with the MC? I'll try to work out how the xml binding works and add some tests at the MC layer.

          Currently this works the same as in AOP, i.e. AOP is in charge of instantiating the mixins. Do we want the mixins to be MC managed as well, and if so for this release or can it come later?

          • 2. Re: JBAOP-82 - AOP Proxy Factory
            Adrian Brock Master

            Yes. It would be good to support "MC constructed mixins" for proper
            dependencies, like the MC constructed advice factories.

            I don't know what this entail, maybe some kind of MC configured
            MixinFactory that has a createMixin(Object realObject)?

            • 3. Re: JBAOP-82 - AOP Proxy Factory
              Adrian Brock Master

              This MC mixin config isn't a requirement for 2.0.0M1

              • 4. Re: JBAOP-82 - AOP Proxy Factory
                Kabir Khan Master

                I've set up the aspects build-test.xml to run the proxyfactory tests both with weaving and without.

                Initially, the test with weaving caused a load of errors. But these were mainly due to the test interceptors checking for the wrong method.
                * MethodInvocation.getMethod() always returns the "proper" method a user would use.
                * MethodInvocation.getActualMethod() is the method that will be invoked by the MethodInvocation at the end of the chain and is considered internal to AOP.

                Without weaving enabled, there is one more failing test org.jboss.test.proxyfactory.test.FieldTestCase. I notice that is is excluded from the ProxyFactoryTestSuite, but it is picked up by the build-tests.xml. Question is should it be excluded, since I don't see how the final check can possibly succeed since the proxy and the wrapped target are separate instances and will have separate fields

                • 5. Re: JBAOP-82 - AOP Proxy Factory
                  Kabir Khan Master

                  To run
                  $cd jboss-jhead/aspects
                  $build -f build-test.xml
                  $build -f build-test.xml tests

                  • 6. Re: JBAOP-82 - AOP Proxy Factory
                    Adrian Brock Master

                    I only created the field test as a reminder.
                    If this cannot be supported (which is ok)
                    then it just needs documenting somewhere and the test removed.