Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

optimistic locking

 
Rashmi Goyal
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi....I am new to hibernate. I want to use automatic versioning and according to hibernate documentation in 10.4.2, I should call session.connection.commit.

so my question is what is the difference in between session.connection().commit and transaction.commit.

and when to use which commit.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think session.connection.commit() will discontinue your session, and transaction.connection.commit() will discontinue your transaction.
[ October 07, 2004: Message edited by: adeel ansari ]
 
Rashmi Goyal
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks adeel.

For automatic versioning , do i have to discontinue session.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!