Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] dispose event for CDOResource
[CDO] dispose event for CDOResource [message #1651837] Thu, 05 March 2015 14:43 Go to next message
Alexander Klatt is currently offline Alexander KlattFriend
Messages: 59
Registered: April 2014
Member
Hello,

let's say we have got a CDOResourceFolder whose content changes quite rapidly(maybe up to each 10ms).
I am only interested in getting a notification if a certain CDOResource was deleted.

I could do this by adding a content adapter to the the resource folder, but this seems kind of wrong to me. Is there any better way to do this?
Re: [CDO] dispose event for CDOResource [message #1652157 is a reply to message #1651837] Thu, 05 March 2015 18:38 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6444
Registered: July 2009
Senior Member
Am 05.03.2015 um 15:43 schrieb Alexander Klatt:
> Hello,
>
> let's say we have got a CDOResourceFolder whose content changes quite rapidly(maybe up to each 10ms).
> I am only interested in getting a notification if a certain CDOResource was deleted.
>
> I could do this by adding a content adapter to the the resource folder, but this seems kind of wrong to me. Is there
> any better way to do this?

There are several ways with CDO to listen for remote model changes. If you're interested in the concrete chnage deltas
you need to either set the sessions's passive update mode to CHANGES (in which case your client will receive all commit
infos with full delta information) or adding an EMF adapter to a specific object (which requires to set the view's
change subscription policy). A more efficient approach for your scenarion could be to use none of that, but instead add
a CDOObjectHandler to the view and handle the state changes of the respective object.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] dispose event for CDOResource [message #1653505 is a reply to message #1652157] Fri, 06 March 2015 08:52 Go to previous messageGo to next message
Alexander Klatt is currently offline Alexander KlattFriend
Messages: 59
Registered: April 2014
Member
Thank you Eike!

Though I am still uncertain about the CDOStates:
can I assume that a deleted resource will always get the state "INVALID" ?
Re: [CDO] dispose event for CDOResource [message #1653524 is a reply to message #1653505] Fri, 06 March 2015 09:04 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6444
Registered: July 2009
Senior Member
Am 06.03.2015 um 09:52 schrieb Alexander Klatt:
> Thank you Eike!
>
> Though I am still uncertain about the CDOStates:
> can I assume that a deleted resource will always get the state "INVALID" ?
Yes, unless you've locally changed that object (i.e. locally DIRTY) and then it gets deleted remotely. Inthat special
case you'll locally transition to INVALID_CONFLICT.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:Generating Java code from java classes in RCP
Next Topic:Doubts about autocompletion
Goto Forum:
  


Current Time: Tue Sep 17 09:13:05 GMT 2019

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

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

Back to the top