Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Can client listen for new objects added to server?
[CDO] Can client listen for new objects added to server? [message #1001080] Wed, 16 January 2013 01:16 Go to next message
Warwick Burrows is currently offline Warwick BurrowsFriend
Messages: 132
Registered: July 2009
Location: Austin, TX
Senior Member
Hi,

Is it possible to configure a listener on a CDO client that is alerted when new objects of the type its interested in are added to the CDO server from another client? I have one client that manages the creation and editing of my objects and another that's a read-only user of the objects. The read-only client needs to know when new objects are added so that it can update its list of available objects.

Thanks,
Warwick
Re: [CDO] Can client listen for new objects added to server? [message #1001189 is a reply to message #1001080] Wed, 16 January 2013 08:19 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Am 16.01.2013 02:16, schrieb Warwick Burrows:<br>
<blockquote cite="mid:kd4v1n$qe4$1@xxxxxxxxe.org" type="cite">Hi,
<br>
<br>
Is it possible to configure a listener on a CDO client that is
alerted when new objects of the type its interested in are added
to the CDO server from another client?  I have one client that
manages the creation and editing of my objects and another that's
a read-only user of the objects. The read-only client needs to
know when new objects are added so that it can update its list of
available objects.
<br>
</blockquote>
That has been asked on 09-18-2009 and I fear not much has changed in
this regard. The reason is that we don't have this piece of
information on the client in all cases. If fired the
CDOViewInvalidationEvent is always fired from
CDOViewImpl.invalidate() and calls this invalidate() method occur
for one of 4 reasons:<br>
<br>
<img src="http://www.eclipse.org/forums/index.php?t=getfile&amp;id=12984" alt=""><br>
<br>
1) remote commits while session.passiveUpdatesEnabled==true<br>
2) local commits<br>
3) manual refreshs while session.passiveUpdatesEnabled==false<br>
4) change of the view target<br>
<br>
Only in the first two cases the newObjects info is available. We
probably don't need/want it in the fourth cases. But there's still
the third one which is, conceptually, not that different from the
first one. It's a little like suspending the continuous, automatic
passive updates and doing active, batched updates instead from time
to time. This can only be efficient because the client asks the
server to send deltas for the currently loaded (viewed) objects.<br>
<br>
I wonder if we finally should try to provide the newObjects by
*some* means. As several people on the older thread already argued
this piece of information doesn't fit well with the original purpose
of the CDOViewInvalidationEvent (provide change info for
loaded/viewed objects). The only thing that speaks for this
particular event type is the delivery time, if compared to the time
the CDOSessionInvalidationEvent is delivered (which *does* carry the
newObjects info).<br>
<br>
Any thoughts?<br>
<br>
Cheers<br>
/Eike<br>
<br>
----<br>
<a class="moz-txt-link-freetext" href="http://www.esc-net.de">http://www.esc-net.de</a><br>
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a><br>
<a class="moz-txt-link-freetext" href="http://twitter.com/eikestepper">http://twitter.com/eikestepper</a><br>
<br>
<br>
</body>
</html>
  • Attachment: behfdehh.png
    (Size: 48.00KB, Downloaded 162 times)


Re: [CDO] Can client listen for new objects added to server? [message #1001467 is a reply to message #1001189] Wed, 16 January 2013 19:21 Go to previous messageGo to next message
Warwick Burrows is currently offline Warwick BurrowsFriend
Messages: 132
Registered: July 2009
Location: Austin, TX
Senior Member
Thanks Eike. Now I know what to look for (CDOViewInvalidationEvent) I will search the forums for other references to it and gather more information. A quick look indicates that I can get object addition notifications if I set passiveUpdatesEnabled (as you've suggested) and register a listener. This seems like an "active" update. Is it called "passive" because I need to do something to pull the new and changed objects into the client cache?

BTW, it looks like your posted was posted 5 times to this thread in response to my question and in HTML which is hard to read. Is there a problem with the eclipse forums?

Thanks,
Warwick

Re: [CDO] Can client listen for new objects added to server? [message #1001644 is a reply to message #1001467] Thu, 17 January 2013 05:37 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 16.01.2013 20:21, schrieb Warwick Burrows:
> Thanks Eike. Now I know what to look for (CDOViewInvalidationEvent) I will search the forums for other references to
> it and gather more information. A quick look indicates that I can get object addition notifications if I set
> passiveUpdatesEnabled (as you've suggested) and register a listener. This seems like an "active" update. Is it called
> "passive" because I need to do something to pull the new and changed objects into the client cache?
Not sure what you mean. It's called "passive" because it causes model updates in/from a background thread that
represents the server.

> BTW, it looks like your posted was posted 5 times to this thread in response to my question and in HTML which is hard
> to read. Is there a problem with the eclipse forums?
Yes, the forum software is IMHO totally broken. And that for years. Please take a minute and submit a bugzilla:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Community

Cheers
/Eike

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


Re: [CDO] Can client listen for new objects added to server? [message #1002041 is a reply to message #1001644] Thu, 17 January 2013 20:09 Go to previous message
Warwick Burrows is currently offline Warwick BurrowsFriend
Messages: 132
Registered: July 2009
Location: Austin, TX
Senior Member
Sure. I've opened bugzilla 398445 for the multiple posting of replies in html.
Previous Topic:[CDO] Exception on commit
Next Topic:[CDO] Diagnostic/Reparation tool
Goto Forum:
  


Current Time: Tue Apr 16 23:10:49 GMT 2024

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

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

Back to the top