Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Locking a table

 
Ingoba Ningthoujam
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me how to lock a table in Hibernate?
In JDBC, we do by using Conntction.TRANSACTION_SERIAZABLE.

Please help.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And in your hibernate.cfg.xml or persistence.xml, in JPA, you can set the transaction level and they match the JDBC transaction levels.

Mark
 
Ingoba Ningthoujam
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please send me the sample code?
Thanks.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the optional configuration properties in the documentation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic