Tapestry
  1. Tapestry
  2. TAPESTRY-2256

Provide an annotation to support automatic committing of the transaction after a component or service method invocation

    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-hibernate
    • Labels:
      None

      Description

      It would be nice to have an annotation, @CommitAfter, that could be placed on a service interface method.

      A decorator could recognize methods with such annotations, and use the HibernateSessionManager to commit the transaction after invoking the method.

      Currently, you must inject the HSM directly and invoke commit() on it.

      1. TAPESTRY-2256.patch
        14 kB
        Igor Drobiazko

        Activity

        Howard M. Lewis Ship created issue -
        Hide
        Igor Drobiazko added a comment -

        Patch fixing the issue

        Show
        Igor Drobiazko added a comment - Patch fixing the issue
        Igor Drobiazko made changes -
        Field Original Value New Value
        Attachment TAPESTRY-2256.patch [ 12378967 ]
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Howard M. Lewis Ship added a comment -

        Good start with the patch.

        I'm looking to expand it to support @CommitAfter on component event methods as well.

        Show
        Howard M. Lewis Ship added a comment - Good start with the patch. I'm looking to expand it to support @CommitAfter on component event methods as well.
        Howard M. Lewis Ship made changes -
        Summary Add simple transaction manager decorator service Provide an annotation to support automatic committing of the transaction after a component or service method invocation
        Hide
        Howard M. Lewis Ship added a comment -

        Thanks for the patch; I extended it a lot, with docs, more tests, the exception logic and the ability to use the annotation on component methods. Fun stuff!

        Show
        Howard M. Lewis Ship added a comment - Thanks for the patch; I extended it a lot, with docs, more tests, the exception logic and the ability to use the annotation on component methods. Fun stuff!
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.0.12 [ 12313048 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.1 [ 12312964 ]
        Resolution Fixed [ 1 ]
        Hide
        Igor Drobiazko added a comment -

        Great! I'm glad you found it helpful.

        Show
        Igor Drobiazko added a comment - Great! I'm glad you found it helpful.
        Mark Thomas made changes -
        Workflow jira [ 12426414 ] Default workflow, editable Closed status [ 12568710 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568710 ] jira [ 12591736 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        33d 15h 15m 1 Howard M. Lewis Ship 16/Apr/08 16:15
        In Progress In Progress Closed Closed
        5h 5m 1 Howard M. Lewis Ship 16/Apr/08 21:21

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development