users@glassfish.java.net

Locking Issue With Sequences Is There a Better JPA Way?

From: <glassfish_at_javadesktop.org>
Date: Mon, 24 Sep 2007 19:04:47 PDT

I have a POJO which contains a list of child POJO's, which in turn contains another set of children. As the POJO's are of the same type they do not have different identity columns.

Upon inserting the data I have to have a new transaction for each third level branch i insert, due to memory constraints it has to be this way. Unfortunately the generated value (sequence table) is being locked by the parent transaction and blocking the system. This does not occur with hibernate but I want to make sure this works with toplink.

I cannot switch to sequences as I am trying to make sure the system works with Derby.

Hope this makes sense
[Message sent by forum member 'nwakefield' (nwakefield)]

http://forums.java.net/jive/thread.jspa?messageID=236874