Hibernate Transactions

How to do transactions with Hibernate?

Questions by Jagadish.gadarla

Showing Answers 1 - 3 of 3 Answers

prsrinu

  • Feb 26th, 2009
 

Session session = getSessionFactory().openSession();
Transaction tx = session.beginTransaction();
MyPersistanceClass mpc = new MyPersistanceClass ("Sample App");
session.save(mpc);
tx.commit();
session.close();

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions