Uploaded image for project: 'ATOM Feed'
  1. ATOM Feed
  2. ATF-24

Ensure feed creation is successful only if the underlying transaction is successful

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Must
    • Resolution: Fixed
    • None
    • None

    Description

      Based on wyclif comments on this thread:  https://talk.openmrs.org/t/refactoring-the-event-module-or-not/17281/8?u=wyclif

      We need to make are to move the calls that create the feeds to be made before transaction completion, this has 2 benefits

      • The module doesn’t need to create a new transaction to be able to commit the created feed instances to the DB.
      • In the event of failure of creation of the feed, the entire transaction fails as a single unit.

      If there is a compelling reason to make the call backs after transaction completion then I’d think the work around would be to fix the service method that saves the feeds to be annotated with @Transactional and the propagation attribute set to REQUIRES_NEW and let spring deal with the transaction management as opposed to doing it manually like the current code

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                mseaton Mike Seaton
                mseaton Mike Seaton
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: