aspose file tools*
The moose likes Object Relational Mapping and the fly likes Why not to use Increment generator type in clustered deployment environment? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Why not to use Increment generator type in clustered deployment environment?" Watch "Why not to use Increment generator type in clustered deployment environment?" New topic
Author

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

vaidehi agate
Greenhorn

Joined: Aug 23, 2010
Posts: 2
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

Joined: Apr 14, 2004
Posts: 10336

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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
 
subject: Why not to use Increment generator type in clustered deployment environment?