-->
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: hilo generators max_lo
PostPosted: Mon Apr 09, 2007 10:58 am 
Newbie

Joined: Mon Apr 09, 2007 10:44 am
Posts: 2
Hi,

I have a couple of tables that use the same table to get the hilo sequence generator number for its ID column. The underlying db is AS400. All of them have it defined like this:

<id name="id" type="java.lang.Integer" unsaved-value="0">
<column name="XXCOLACID" sql-type="decimal(7,0)" not-null="true"/>
<generator class="hilo">
<param name="table">PFXXXSEQ</param>
<param name="column">NXTVAL</param>
<param name="max_lo">100</param>
</generator>
</id>

I get the following error very frequently. Many times when one of the batch jobs is in the middle of doing a lot of delete/inserts in one of the tables.

[4/9/07 10:12:46:288 EDT] 1d73e5f3 TableGenerato E org.hibernate.id.TableGenerator could not read a hi value
[4/9/07 10:12:46:319 EDT] 1d73e5f3 TableGenerato E org.hibernate.id.TableGenerator TRAS0014I: The following exception was logged java.sql.SQLException: [SQL0913] Row or object PFXXXSEQ in DATA type *FILE in use.


Should I keep the 'max_lo' field high or low for this? Or different for different tables?

Is hilo not supposed to be used by many different tables at the same time.

Any other setting in hibernate or database I am missing?

Thanks!


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.