[CDO] Notifications [message #781272] |
Fri, 20 January 2012 22:06 |
Per Sterner Messages: 91 Registered: October 2011 |
Member |
|
|
Hello,
I have read a lot but I am still unsure.
1. I have an osgi runtime with a CDO Repo runnig.
2. I have another osgi runtime with a CDO session to the repo & a read only view. But this instance doesn't touch any item at startup.
If I now change the model instance in the repo, I'd like to get 'CDOView events' with deltas.
For now I have manually added a CDO session listener which touches the changed object (if it is interesting) and then I get CDOView events. This solution is probably no good idea because I only get deltas for the currently cached objects?
Can I configure CDO to achieve this without the session listener?
Regards,
Per
[Updated on: Fri, 20 January 2012 22:08] Report message to a moderator
|
|
|
Re: [CDO] Notifications [message #781424 is a reply to message #781272] |
Sat, 21 January 2012 07:23 |
|
Am 20.01.2012 23:06, schrieb Missing name Mising name:
> Hello,
>
> I have read a lot but I am still unsure.
>
> 1. I have an osgi runtime a CDO Repo runnig. 2. I have another osgi runtime CDO session to the repo & a read only
> view. But this instance doesn't touch any item at startup.
Can you be more prcise? What instance, what is "touch", what is "item", what is startup?
>
> If I now change the model instance in the repo, I'd like to get 'CDOView events' with deltas.
You should either:
view.getSession().options().setPassiveUpdateMode(PassiveUpdateMode.CHANGES / .ADDITIONS);
or (more selectively):
view.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
>
> For now I have manually added a CDO session listener which touches the changed object (if it is interesting)
What means "touches"? A CDOSession does not know about EObjects.
> and then I get CDOView events.
You mean CDOSessionInvalidationEvents?
> This solution is probably no good idea because I only get deltas for the currently cached objects?
I don't understand your solution because you seem to be messing up sessions and views (which know about EObjects).
>
> Can I configure CDO to achieve this without the session listener?
Achieve what? Receive all changes? Have a look how
org.eclipse.emf.cdo.internal.server.syncing.RepositorySynchronizer.RemoteSessionListener uses CDOSessionInvalidationEvents.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.02231 seconds