This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Object Relational Mapping and the fly likes hibernate which generator to use in clustered environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hibernate which generator to use in clustered environment" Watch "hibernate which generator to use in clustered environment" New topic
Author

hibernate which generator to use in clustered environment

lavnish lalchandani
Ranch Hand

Joined: Feb 28, 2007
Posts: 79
Hi
I have often read "not to use Increment generator type in clustered deployment environment"
but my ques is which one should be used in clustered environment ?? any of the remaining ?

lavnish.blogspot.com
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

The Hibernate specific ‘increment’ generator can not safely be used in a clustered environment. However any of the standards compatible ones (TABLE, SEQUENCE, IDENTITY) can. With the table strategy you get good performance and portability. With sequence you get performance but lose portability, identity is the weakest of the 3 on performance (no pre-allocation) and also not portable across all databases.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hibernate which generator to use in clustered environment