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!
|