All -

I'm getting unexpected results from H2 and am not sure if it's a bug
or if it's the correct behavior.  My setup is as follows:

I'm using H2 via Apache Commons DBCP (connection pooling, 10
connections).

I'm using a disk-based in process / embedded database.

I launch eight threads in my program , each of which repeatedly
inserts rows into a table that has an auto-increment sequence as a
column.  I've set the options to retrieve any auto-generated data.
Unfortunately, when I retrieve these auto-generated keys, there are
often duplicates, particularly with the first "0" value.  I've worked
around this problem by using Java's AtomicLong to generate the keys
instead of H2, but it does seem to me at least that this H2 behavior
is unexpected.

Is this the what others are seeing from H2?  Does this strike anyone
else as odd?

Thanks,
Jeff

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to