Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO 4.1] : Adapter of ResourceSet of remote user not notified on Resource add/remove
[CDO 4.1] : Adapter of ResourceSet of remote user not notified on Resource add/remove [message #881962] Tue, 05 June 2012 14:50 Go to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 340
Registered: July 2009
Senior Member
Hi,

I have a use case where on a first client I remove a CDOResource from
its ResourceSet and commit, and on a second client receiving the remote
changes, I have a Adapter on the ResourceSet to see if a Resource has
been added or removed to refresh somes Eclipse views, but this Adapter
is not notified while on the ResourceSet of the first client it is
notified by EMF. Can I consider that as a bug?
I have attached a JUnit test to reproduce the use case.

Best Regards.
Re: [CDO 4.1] : Adapter of ResourceSet of remote user not notified on Resource add/remove [message #882015 is a reply to message #881962] Tue, 05 June 2012 16:20 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 05.06.2012 16:50, schrieb Esteban Dugueperoux:
> Hi,
>
> I have a use case where on a first client I remove a CDOResource from its ResourceSet and commit, and on a second
> client receiving the remote changes, I have a Adapter on the ResourceSet to see if a Resource has been added or
> removed to refresh somes Eclipse views, but this Adapter is not notified while on the ResourceSet of the first client
> it is notified by EMF. Can I consider that as a bug?
No, that's the expected behaviour. A ResourceSet is, in contrast to Resources and EObjects, a transient concept. Hence
changes to them are neither persisted nor are respective notifications ditributed.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO 4.1] : Adapter of ResourceSet of remote user not notified on Resource add/remove [message #882280 is a reply to message #882015] Wed, 06 June 2012 07:18 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 340
Registered: July 2009
Senior Member
On 05/06/2012 18:20, Eike Stepper wrote:
> Am 05.06.2012 16:50, schrieb Esteban Dugueperoux:
>> Hi,
>>
>> I have a use case where on a first client I remove a CDOResource from
>> its ResourceSet and commit, and on a second client receiving the
>> remote changes, I have a Adapter on the ResourceSet to see if a
>> Resource has been added or removed to refresh somes Eclipse views, but
>> this Adapter is not notified while on the ResourceSet of the first
>> client it is notified by EMF. Can I consider that as a bug?
> No, that's the expected behaviour. A ResourceSet is, in contrast to
> Resources and EObjects, a transient concept. Hence changes to them are
> neither persisted nor are respective notifications ditributed.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>

Hi,

Ok I understand, in my use case, the remote user is well notified when
deleting the Resource.

Thanks.
Re: [CDO 4.1] : Adapter of ResourceSet of remote user not notified on Resource add/remove [message #882289 is a reply to message #882280] Wed, 06 June 2012 07:38 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 06.06.2012 09:18, schrieb Esteban Dugueperoux:
> Ok I understand, in my use case, the remote user is well notified when deleting the Resource.
If you set your session to PassiveUpdateMode.ADDITIONS you should be notified about all creations and deletions through
CDOViewInvalidation events.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:[CDO]Again "selected specification is unresolved" errors.
Next Topic:[CDO] Reference to CDOObject
Goto Forum:
  


Current Time: Mon Nov 24 21:38:59 GMT 2014

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

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