Alexey, thanks for pointing me to that example. I copied it but it only seems
to work when the object is stored on the same node.
Eg. with 1 node
before IgniteCache.put(myObj), myObj.locking is null
in CacheStore.write(myObj), myObj.locking is set to 0 by Hibernate
after IgniteCache.put(myObj), myObj.locking is 0

Eg. with 2 nodes
before IgniteCache.put(myObj), myObj.locking is null
in CacheStore.write(myObj), myObj.locking is set to 0 by Hibernate
after IgniteCache.put(myObj), myObj.locking is null

I suspect this is the sequence of events
IgniteCache.put(myObj)
   myObj is serialized and sent to another node
   myObj is deserialized at another node
   CacheStore.write(myObj)
      myObj is populated with locking and other data by
hibernateSession.saveOrUpdate(myObj)
   back to original node, myObj is saved to IgniteCache
Therefore, the changes made by Hibernate are lost.
This only works when the object is stored on the local node, so that the
changes made in CacheStore.write are made on the same instance in the same
JVM.

Thoughts/suggestions?



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/CacheStore-implementation-using-Hibernate-tp1423p1444.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to