*
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
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
 
Similar Threads
Why not to use Increment generator type in clustered deployment environment?
clustered envirornment - Topic / Queue
Static Data
caching
Sharing the data bettween web applications