Affects Version/s: None
Fix Version/s: None
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