• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction Implementation.

 
Anton Golovin
Ranch Hand
Posts: 527
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How exactly is transaction implemented in code?
[ September 09, 2008: Message edited by: Anton Golovin ]
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
session.beginTransaction();

//do stuff

session.getTransaction().commit();

That's how we did it with a Hibernate Session. Using an Entity Manager shouldn't be much different. It's pretty simple. Check out the JavaDoc for the UserTransaction object for methods.

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic