users@glassfish.java.net

Problems with final connection.commit

From: <glassfish_at_javadesktop.org>
Date: Thu, 18 Oct 2007 06:31:59 PDT

Hi All,

in a really complex (deep inheritance-hiearchies of persistent entites,
bidirectional references etc.) JPA Entity Model we have some problems
with committing the transaction into the database.

Use Case: Adding an additional relation to a bidirectional @OneToMany
relation causes the inconsistency in a specific context. However it is a
specific case - other Use Cases work without any problems. Remove and
all other operations work as well.

It turns out, that in this particular case the
java.sql.Connection.commit() isn't invoked. The problem is somehow
related with the
oracle.toplink.essentials.internal.helper.ConcurrencyManager and it's
depth field. At the end of the transaction the depth is greater than
one, so the final connection.commit isn't executed (TopLink thinks,
there are still some ongoing transactions). The problem here: all
following operations are not committed as well, because of this phenomenon.

We use TopLink inside Eclipse RCP with RESOURCE_LOCAL configuration.

Any thoughts, or ideas, what causes this phenomenon? We are using the
current TopLink Essentials version,

thank you in advance,

adam bien
[Message sent by forum member 'abien' (abien)]

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