Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] TableGenerator and concurrency

Hello; I hope that in particular Andrei is lurking :-)

We have a table set up to support EclipseLink's @TableGenerator support.  It is called jpa_sequence.

We are seeing that in the presence of many concurrent inserts there is a ton of contention over this table.  It looks like perhaps the algorithm that reserves identifiers from the table is not run in its own transaction, or...well, in any event, it appears that the transactions that wrap our inserts are blocking EclipseLink from periodically UPDATEing the jpa_sequence table.

I'm having trouble explaining this.  Let me try again.

We have lots of concurrent processes running that need to do a ton of entity insertions.  All these entities are of the same type.  All use table generation for their identifier allocation.

Each such insertion runs in its own transaction.  The transaction is non-trivial and can take a while.

We notice that the periodic UPDATE jpa_sequence WHERE... statements that EclipseLink issues are timing out against our Informix database periodically, because (it seems) they are being issued in the context of the *business* transaction (the non-trivial one wrapping an insert) and not in their own transaction (as I thought would be the case).

Could someone kindly describe exactly--including transactional and locking semantics--the steps taken by the EclipseLink @TableGenerator support to allocate a new identifier?

Best,
Laird

--
http://about.me/lairdnelson

Back to the top