File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session.connection() is depricated . How to setAutoCommit(false) ?

 
dileep keely
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to do a rollback if an exception occur. I have used the below for connecting and setting the autocommit as false.
But as you know that "session.connection" is depricated. How can I set the autocommit as false.



query:
1.Iam afraid if I set autocommit as false explicitly from the properties files the rest of the existing code (say some other 20+ DAOIMPL files ) I should do commit() if we set from properties as autocommit as false ?? Please clarify me is this is correct?
2.How to do autocommit as false without explicitly setting from properties file.

Any way still using the hibernateTemplate ?

Please suggest me.
 
dileep keely
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got a way out by using spring Transaction management
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic