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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Must
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Complexity:
      Low

      Description

      Based on Wyclif Luyima 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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: