Hi again,

<snip>


Explanation given above. Of course you won't be happy with my "works as designed" answer.
Maybe the logic should be changed to not mark StateXxxDelete Objects as dirty?

I had a deeper look at the code. I think you are right! I changed the semantics as follows (already checked into CVS):
// if the Object has been modified by transaction, mark object as dirty
// but only if it has not been marked during tx already !!
if ( (! mod.needsDelete()) &&
(! mod.needsInsert()) &&
(! mod.needsUpdate()) )
{
if (mod.hasChanged();
{
// implicitely acquire a write lock !
transaction.lock(mod.getObject(), Transaction.UPGRADE);
// mark object dirty
mod.setModificationState(
mod.getModificationState().markDirty());
}
}

Now Objects are only marked implicitely if they have not been marked during the current transaction.

This helps to keep a clear semantics as in your case.
And it also improves the performance, as the mod.hasChanged() method is expensive.

Thanks!

Thomas


cheers,
Thomas

Thank you in advance.

Jose Maria


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






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






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

Reply via email to