Category "transactions"

is there a way to set after_commit callbacks to a specific ActiveRecord transaction

I am creating a ActiveRecord transaction this way ActiveRecord::Base.transaction do MyModel.create!(name: "value") OtherModel.create!(name: "value") end

Creating JPA session for background threads

We use Hibernate through JPA and Spring to manage object persistence in our web application. We use open-session-in-view pattern to create sessions for threads