Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why not to use Increment generator type in clustered deployment environment?

 
vaidehi agate
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the small query:
I was going through a tutorial in which i found that Increment generator type should not be used in clustered deployment environment.
Can anybody tell me the reason behind the same?
Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the value is generated by Hibernate rather than the database. If you have multiple JVMs generating ids for the same entity you can't guarantee the value is unique.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic