>>> Valery Kokhan
vkokhan@xxxxxxxxxxxxxx> 4/16/07 3:14 PM >><snip>
>>>My second point of confusion with option 3a is proposed
>>>TransactionSemantics parameter. My question is what will happens when
>>>first we call few methods with the semantic parameter set to
>>>"OnCommit" and then we call another method with the semantic parameter
>>>set to "Immediate"?
>>
>> All updates which set it to "OnCommit" are held by the CP until
>> IContext.commit is called. All updates which set it to "Immediate"
>> are committed immediately. So, yes, you could mix these calls if you wanted.
>>
>I'd prefer not to mix them because it may leads to a hardly resolvable
>situations when my waiting updates become invalid after a single call
>to "immediate" method.
The same problem exists when another entity concurrently makes changes to the backing data store. We haven't said that a Context (or its backing data) is locked and only updatable by a single entity at a single time. When something like this happens, the call to commit will have to fail. As a user, I would avoid mixing these when the updates affect the same subject.