Hi ojb folks!

I'm using the OJB RC6 ODMG api to persist my objects, when updating an object I get the following behaviour:

obj = fetchObj();

case 1: lost update when calling checkpoint AFTER obj is locked by the transaction and BEFORE obj is changed.

tx.begin();
tx.lock(obj, WRITE);
obj.setX(obj.getX()); // obj is locked but unchanged
tx.checkpoint(); // or flush --> no update tx.lock(obj, WRITE);
obj.setY(newValue); // obj changed
tx.checkpoint(); // or flush() --> no update BUG?
tx.commit(); // no update in the db



The change by setY() is successfully persisted when: 1. When ommitting the first call to checkpoint. 2. When obj is not locked by tx before the first call to checkpoint. 3. When obj is locked AND changed before the first call to checkpoint.

Is this the correct behaviour?


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



Reply via email to