Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Locking a table  RSS feed

 
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: 17309
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.
 
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
Boost this thread!