-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hilo ID generator with multiple hibernate clients
PostPosted: Tue Dec 04, 2007 11:45 am 
Newbie

Joined: Tue Dec 04, 2007 10:57 am
Posts: 1
Location: FRANCE
Hi All,

I would like to use a same tool on different computers (so different jvm) which saves data to a Derby database setuped in server mode (not embedded).
This tool uses Hibernate version 3.2.0.ga and a HILO ID generator for several tables.

Can the tools on different computers generate a same ID due to the HILO generator, and thus create an error ?

I've read the doc on HILO but didn't find an answer to this question...

Thanks in advance for your help and light :-)

Regards,
JavaWorker


Top
 Profile  
 
 Post subject: Re: Hilo ID generator with multiple hibernate clients
PostPosted: Tue Dec 04, 2007 12:06 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
JavaWorker wrote:
Hi All,

I would like to use a same tool on different computers (so different jvm) which saves data to a Derby database setuped in server mode (not embedded).
This tool uses Hibernate version 3.2.0.ga and a HILO ID generator for several tables.

Can the tools on different computers generate a same ID due to the HILO generator, and thus create an error ?

I've read the doc on HILO but didn't find an answer to this question...

Thanks in advance for your help and light :-)

Regards,
JavaWorker


No it should not. HILO will reserve a range of ids each time it goes to the HILO table in db and thenafter it only dispenses from its reserved region which is not available to the other instances. This process repeats each time it runs out of available ids. The downside of this is that if you configure your region size with a high number you will lose ids if your instances restart frequently.


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

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.