• Post Reply Bookmark Topic Watch Topic
  • New Topic

Locking a table  RSS feed

 
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.
 
ranger
Sheriff
Posts: 17314
11
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.
 
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.
 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!