openjpa-users mailing list archives

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

Hi,

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
pointer.

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?

Thanks,
Oliver 




-- 
View this message in context: http://n2.nabble.com/RemoteCommitProvider-using-TCP-transactional---tp3017437p3017437.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message