Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TransactionStatus status = transactionManager.getTransaction(def);
- try{
- doHibernateStuff1(); //Does Hibernate stuff with session
- //factory related to Tx Manager
- doHibernateStuff2(); //Does Hibernate stuff with session
- //factory not related to Tx Manager
- }
- catch(DataAccessException){
- transactionManager.rollback(status);
- }
- transactionManager.commit(status); //Exception happens here.
Add Comment
Please, Sign In to add comment