Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Passive updates
[CDO] Passive updates [message #429958] Thu, 07 May 2009 12:49 Go to next message
Anders Forsell is currently offline Anders ForsellFriend
Messages: 127
Registered: July 2009
Senior Member
I have turned off passive updates for my CDO session. Do I need to
refresh the session when committing a transaction, or is it done implicitly?

---
Anders
Re: [CDO] Passive updates [message #429961 is a reply to message #429958] Thu, 07 May 2009 14:05 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Anders Forsell wrote:
> I have turned off passive updates for my CDO session. Do I need to
> refresh the session when committing a transaction, or is it done
> implicitly?
>
> ---
> Anders
At the moment, yes.

But I think it will make sense to refresh automatically. WHat do you think ?

Simon
Re: [CDO] Passive updates [message #429962 is a reply to message #429961] Thu, 07 May 2009 14:46 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Simon McDuff schrieb:
> Anders Forsell wrote:
>> I have turned off passive updates for my CDO session. Do I need to
>> refresh the session when committing a transaction, or is it done
>> implicitly?
>>
>> ---
>> Anders
> At the moment, yes.
>
> But I think it will make sense to refresh automatically. WHat do you
> think ?
Hmm, not sure about this one:
Refreshing the session affects *all* views/transactions of that session.
Is that something that should be implicitely done by one of the
transactions?

Cheers
/Eike

----
http://thegordian.blogspot.com


Re: [CDO] Passive updates [message #429968 is a reply to message #429962] Thu, 07 May 2009 18:42 Go to previous messageGo to next message
Anders Forsell is currently offline Anders ForsellFriend
Messages: 127
Registered: July 2009
Senior Member
I am not sure I fully understand the concept of passive updates.

If a client starts modifying a CDO resource I understand that the
objects are loaded on demand as they are needed. If another client
modifies the same resource and commits a transaction will the client
receive updates to its cached objects? Are these modifications done on a
separate thread and how are conflicting changes handled?

When not using passive updates what happens during a session refresh?
(especially when there are modifications that have not been committed yet).

Thanks,

---
Anders


Eike Stepper wrote:
> Simon McDuff schrieb:
>> Anders Forsell wrote:
>>> I have turned off passive updates for my CDO session. Do I need to
>>> refresh the session when committing a transaction, or is it done
>>> implicitly?
>>>
>>> ---
>>> Anders
>> At the moment, yes.
>>
>> But I think it will make sense to refresh automatically. WHat do you
>> think ?
> Hmm, not sure about this one:
> Refreshing the session affects *all* views/transactions of that session.
> Is that something that should be implicitely done by one of the
> transactions?
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
Re: [CDO] Passive updates [message #429969 is a reply to message #429968] Thu, 07 May 2009 19:27 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
A session that Passive update is set to false do no received others
changes until you ask for it.



Anders Forsell wrote:
> I am not sure I fully understand the concept of passive updates.
>
> If a client starts modifying a CDO resource I understand that the
> objects are loaded on demand as they are needed. If another client
> modifies the same resource and commits a transaction will the client
> receive updates to its cached objects?
[SIMON] Only if passive update on session1 is true.

Are these modifications done on a
> separate thread and how are conflicting changes handled?
>
[SIMON] Separate threads (In the case where passive update = true

> When not using passive updates what happens during a session refresh?
[SIMON] All objects in the caches are updated
> (especially when there are modifications that have not been committed yet).
[SIMON] In this case two things could happen
1- The client modified objectA and server didn't it. Nothing special.
2- The client modified objectA and the server have another version of
it. (basically someone else modified and committed that object). In this
case the state of that object will be turned at CONFLICT. You will have
a problem to commit now since you cannot commit until you rollback or
resolve these conflicts.



Simon


>
> Thanks,
>
> ---
> Anders
>
>
> Eike Stepper wrote:
>> Simon McDuff schrieb:
>>> Anders Forsell wrote:
>>>> I have turned off passive updates for my CDO session. Do I need to
>>>> refresh the session when committing a transaction, or is it done
>>>> implicitly?
>>>>
>>>> ---
>>>> Anders
>>> At the moment, yes.
>>>
>>> But I think it will make sense to refresh automatically. WHat do you
>>> think ?
>> Hmm, not sure about this one:
>> Refreshing the session affects *all* views/transactions of that session.
>> Is that something that should be implicitely done by one of the
>> transactions?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
Re: [CDO] Passive updates [message #429970 is a reply to message #429969] Thu, 07 May 2009 19:49 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Simon McDuff schrieb:
> A session that Passive update is set to false do no received others
> changes until you ask for it.
Someone willing to write a FAQ entry for this topic?

>
>
>
> Anders Forsell wrote:
>> I am not sure I fully understand the concept of passive updates.
>>
>> If a client starts modifying a CDO resource I understand that the
>> objects are loaded on demand as they are needed. If another client
>> modifies the same resource and commits a transaction will the client
>> receive updates to its cached objects?
> [SIMON] Only if passive update on session1 is true.
>
> Are these modifications done on a
>> separate thread and how are conflicting changes handled?
>>
> [SIMON] Separate threads (In the case where passive update = true
>
>> When not using passive updates what happens during a session refresh?
> [SIMON] All objects in the caches are updated
>> (especially when there are modifications that have not been committed
>> yet).
> [SIMON] In this case two things could happen
> 1- The client modified objectA and server didn't it. Nothing special.
> 2- The client modified objectA and the server have another version of
> it. (basically someone else modified and committed that object). In
> this case the state of that object will be turned at CONFLICT. You
> will have a problem to commit now since you cannot commit until you
> rollback or resolve these conflicts.
Additional info:

You can add several CDOConflictResolver instances to the options of the
transaction. These classes are possible:
1. TakeRemoteChangesThenApplyLocalChanges
2. MergeLocalChangesPerFeature
3. Your own implementation

Cheers
/Eike

----
http://thegordian.blogspot.com


Previous Topic:EReference and primitive types
Next Topic:Loading all resources at the same time
Goto Forum:
  


Current Time: Fri Apr 26 11:29:56 GMT 2024

Powered by FUDForum. Page generated in 0.03753 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top