openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: ArgumentException in refresh()
Date Wed, 01 Apr 2009 03:12:18 GMT

> (our application is multithreaded)
thought so. Is
  <property name="openjpa.Multithreaded" value="true"> set?

In our program we have the next lines:
if (!em.find( , entity.getClass()))


sometimes we get ArgumentException in the refresh line. 
The cause is that the entity is not managed by this context.
When we use em.contains(entity), the return value is false, but in other cases this is not
enough and an EntityNotFoundException is thorwn.

Is it needed to check both - contains and find?

(our application is multithreaded)

Michael and Udi

Pinaki Poddar            
OpenJPA PMC Member/Committer
JPA Expert Group Member
View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message