openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From okrohne <>
Subject RemoteCommitProvider using TCP transactional ?
Date Wed, 03 Jun 2009 10:40:39 GMT


I have two app server running with openjpa cache and the
RemoteCommitProvider using tcp.
In addition to the RemoteCommitProvider I am using JGroups to notify my app
that objects
are changed and hence need to take some actions.
If a new object of certain class has been added then I fire the notification
via jgroups once my JPA transaction is commited. Here I would expect the
cache of the other server is invalidated.
On the server receiving the jgroup message (containing the id of the added
object in the transaction)
I lookup the object "entityManager.find(clazz, id)" and receive a null

So it looks to me that the cache is not invalidated once the transaction is
committed or
the jpa does go to the database if there was no cache hit for object id.

So my questions are:
  1. Is the RemoteCommitProvider transactional correct across server
instances regarding cache invalidation or is there a time window?
  2. What gets evicted from the cache if a new object has been added, all
instances of the class?
  3. If the lookup in the cache does not hit any object then does openjpa
queries the database?


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

View raw message