openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmdiazlr <>
Subject Can not retrieve concurrent updated data
Date Wed, 11 Feb 2009 20:50:40 GMT

I searched for this theme  and found several references but no solution.

My problem shows up when running two apps concurrently:

1. In application A: I execute a JPA Query, show results.
2. In concurrent application B: I update, insert and commit some objects.
3. In application A: I reexecute the JPA Query, show results, I get the old
data, the data before step 2 (but inserted rows are in the new results, that
is ok).

I know I have to Refresh the Objects, but this is a long result list with
only a few objects being updated concurrently, I do not want to Refresh all
the list, actually I saw in the logs that OpenJPA executed a query egainst
the database, but it is not refreshing the changed objects (I have a version
field that change by a db trgger for each update on the underlying db row). 

I am not using a second level cache.

I supose OpenJPA is only checking by ID if the row comming from the db is
already in the cache, but not using the version field to see if it has to be

Is any configuration missing?

If not, I would like to make this change, but need directions con classes I
need to implement/change.

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message