-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Custom Column Sequence in Clustered Environment
PostPosted: Fri Jul 20, 2012 12:31 pm 
Beginner
Beginner

Joined: Fri Nov 13, 2009 4:05 pm
Posts: 30
We have multiple J2EE instances running in a clustered environment with Hibernate 4.1.5.SP1. We need to be capable of assigning a unique ID to specific records during the initial INSERT to the database based upon specific business needs. For some domain objects, the unique ID increments based on whether it's within the same region, customer, division, or by unique facility. The biggest issue is how to control this across multiple JVMs within a cluster to insure that two or more JVMs don't happen to assign an INSERT with the same number.

I'd rather not consider applying a table lock in order to insert/generate the ID for each specific JVM instance. Note that the use of the database-specific SEQUENCE or IDENTITY concept isn't ideal for these generated values because the need to maintain various number ranges for the same column depending on other values in the database columns.

Ideas?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.