Refactoring the Event module (or not)

For the atomfeed module, the changes 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.