You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Udi <Sa...@gmail.com> on 2009/11/02 10:27:16 UTC

OptimisticLockException problem

Hey,
My application have few EntityManagers.
Each EM, works on a different Thread.
I configured openjpa.Optimistic to false and openjpa.Multithreaded to true.
(Though Im not sure its related)
I get the following exception (sorry for not pasting the full stack... I
just can't):

org.apache.openjpa.persistence.OptimisticLockException: an optimistic lock
violation was detected when flushing objects instance "bla.A-110" to the
data store. This indicates that the object was cocurrently modified in
another transaction.
failed object:
bla.A-bla.A-110
at or.apache...BatchingPreparedStatementManagerImpl.checkUpdateCount(284)
...
...

How can I get this concurrent modification if any EM uses different thread
and connection?

I'm using OpenJPA 1.2.0, btw...

Thanks,
Udi
-- 
View this message in context: http://n2.nabble.com/OptimisticLockException-problem-tp3930693p3930693.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.