Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public class Controller {
  2. public AService aService = new AService();
  3. public BService bService = new BService();
  4.  
  5. public void doSomething(SomeData data) {
  6. //Transaction transaction = HibernateUtil.getSession().openTransaction();
  7. aService.save(data.getSomeVar1());
  8. bService.save(data.getSomeVar2());
  9. //transaction.commit(); or optional try-catch with rollback
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement