1) SessionFactory replaced by EntityManager
2) Transaction transferred from Services to the Controller