persistence@glassfish.java.net

Re: Problem with Committing a transaction

From: James Sutherland <jamesssss_at_yahoo.com>
Date: Thu, 18 Oct 2007 05:49:48 -0700 (PDT)

Turn logging on to finest and see when a beginTransaction() call occurs on
the TopLink session.
Also check if any exceptions are occurring.
What are you doing exactly to recreate the issue, try to narrow down the
cause.
Are you executing any native SQL, or queries using pessimistic locking?
They may be triggering a begin of a transaction that the EntityManager is
not aware of.



Adam Bien wrote:
>
> 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
>


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.oracle.com/technology/products/ias/toplink/ Oracle TopLink , 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  https://glassfish.dev.java.net/javaee5/persistence/ TopLink
Essentials 
Wiki:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence , 
http://wiki.eclipse.org/EclipseLink EclipseLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink , 
http://www.nabble.com/java.net---glassfish-persistence-f13455.html Glassfish
Persistence 
-- 
View this message in context: http://www.nabble.com/Problem-with-Committing-a-transaction-tf4643680.html#a13272227
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.