|Is it possible to run a @TableGenerator in a separate transaction? [message #531363]
||Tue, 04 May 2010 11:37
| Brett Bergquist
Registered: July 2009
I am running into a deadlock situation where I have multiple transactions going handling different user requests. I am using the |
@TableGenerator and the "strategy = GenerationType" to generate ID's. Periodically, I have multiple ID generators for various parts
of the system and periodically I run into a deadlock where one transaction has a lock on one ID generator table row and is waiting
for another one and another transaction has a lock on the other ID generator table row and is waiting for the first. This only
occurs when the generator runs out of pre-allocated ID's and has to update the generator row with the next allocated sequence.
Since I don't really care about ID's not being wasted or holes in the sequence, I was wondering if it is possible to run the ID
allocation in a separate transaction so this deadlock cannot happen?
I supposed I could use just one ID generator table but I think I will still run into issues if I have separate generator rows for
each type of ID that could be assigned.
Any help will be greatly appreciated.
Powered by FUDForum
. Page generated in 0.01599 seconds