Tapestry
  1. Tapestry
  2. TAPESTRY-2365

It should be possible to create decorators without directly writing Javassist code

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.11
    • Fix Version/s: 5.0.12
    • Component/s: tapestry-ioc
    • Labels:
      None

      Description

      What's needed is an AspectDecorator service that can build an interceptor using an Aspect object that recieves an Invocation.

      public interface Aspect

      { void intercept(Invocation invocation); }

      Invocation has a number of methods for accessing or replacing parameters, a proceed() method, and methods of querying and overriding the result value and/or the exception thrown.

        Activity

        Hide
        Igor Drobiazko added a comment -

        It would be nice to use the interfaces of the AOP Alliance (http://aopalliance.sourceforge.net/) instead of Aspect interface.

        Show
        Igor Drobiazko added a comment - It would be nice to use the interfaces of the AOP Alliance ( http://aopalliance.sourceforge.net/ ) instead of Aspect interface.
        Hide
        Howard M. Lewis Ship added a comment -

        That can easily be added as a layer on top of this; however, those interfaces are really geared around a limited runtime model tied to Java reflection and dynamic proxies.

        Show
        Howard M. Lewis Ship added a comment - That can easily be added as a layer on top of this; however, those interfaces are really geared around a limited runtime model tied to Java reflection and dynamic proxies.
        Hide
        Howard M. Lewis Ship added a comment -

        Came out great; I was able to re-implement the LoggingDecorator and the HibernateTransactionDecorator into just about no code whatsoever.

        Show
        Howard M. Lewis Ship added a comment - Came out great; I was able to re-implement the LoggingDecorator and the HibernateTransactionDecorator into just about no code whatsoever.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development