Hi, 

It appears that the cache returns the same object reference for the same
primary key. Does this 
have threading implications?

E.g. (Where "query" is same for both threads) 

Thread # 1 

DataObject dataObject1 = (DataObject)
persistenceBroker.getObjectByQuery(query); 
dataObject1.setValue(value2); // <--- Posible thread conflict here as
dataObject1 == dataObject2
persistenceBroker.store(dataObject1);  

Thread # 2

DataObject dataObject2 = (DataObject)
persistenceBroker.getObjectByQuery(query); 
dataObject1.setValue(value2);
persistenceBroker.store(dataObject2);


Even though the two Threads are within the context of separate transactions
they 
seem to be both able to alter the value of the cached object.


Regards 

Dougall

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to