I'm new in Play Framework and used to manage transactions in java/spring style with controller, transactional service and dao layers. It's pretty usual case for me to have multiply operations with dao in service method and make him @Transactional to rollback all changes if something goes wrong. Service isolated from dao and know nothing about database.
But I didn't find something like this in Anorm framework and Play. All logic placed in controllers and you can make transaction only this ugly way - Database transactions in Play framework scala applications (anorm)
We have several problems here:
- Service turns into dao
- If we need to call same dao method from another service we have change it same way
Is there nice way to manage transactions in Play? Other frameworks like Slick? How to use Play in production with such restricments
DB.withTransaction- cchantep