Search code examples
jpaplayframework-2.1transactional

Play [2.11] jpa transaction


I am trying the play framework with JPA hibernate, looks only can put the @Transactional on the controller class. I plan to create another layer Service might be used for WS or mobile client. I want to start the transaction on the Service layer instead of controller, who knows how to do it? thanks!


Solution

  • I think that when you work with EntityManager from Web Service in play 2.1 you might have the same problem about @Transactional as I had when I've worked with EntityManager from Web Socket.

    So you should do it as it was answered ty my question here. I hope that it might help and that it will work for you as well.