Forums Register Login

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

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Got a way out by using spring Transaction management
I'm gonna teach you a lesson! Start by looking at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1218 times.
Similar Threads
Regarding autoCommit()
EJB/JDBC Transactions
Regarding autoCommit()
Setting autoCommit(false)/Rollback()
connection.SetAutoCommit
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:44:09.