openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cil-Gamir <>
Subject Re: Locking Exception after Persisting new entity
Date Thu, 12 Nov 2009 17:44:33 GMT

Hi Daryl

I'm not closing the entity manager, where should I do this ?

I'm also not familiar with enhancing, my entity classes were declared as
final, and JPA complained saying that it cannot do the enhancement for me if
my classes are final. 

If I want to do the build time enhancement, where is a good place to start
to figure out how.

The basic scenario is as follows.

1. I fetch an entity
2. I make a change to that entity and I save it (saving here involves
creating a new entity as i'm trying to version rows in the database). 
3. I fetch another different entity
4. upon trying to save that entity it fails.

If I only save without persisting a new entity I can do that the whole day.
but once I create a new entity the subsequent operation on any other entity
or the newly saved one throws an optimistic locking exception
View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message